Review main Ready for review

91512[TASK] Improve accessibility for the login screen

Ayke Halder CR 0 V -1 Normal +51 −7 updated 11/11/26, 13:28

Commit message

The error message about upper-/lowercase characters is closed, once the
user starts typing or does a copy-paste in either the username or
password input field.

The error message is bound to the "username" input field by
`aria-errormessage` HTML-attribute.
The error message is activated by `aria-invalid` HTML-attribute.

The `role="alert"` HTML-attribute on the error messages is kept as it
does no harm and might be beneficial:
This way screenreaders might announce the error message on switching
browser-tabs.

The double focusing of input field which resulted in double
screenreader announcements of the field is resolved:
* Remove First focus shift by `autofocus` HTML-attribute, as this is
  always bound to the "username" field.
* Keep second focus shift by javascript, as this is the one that can
  dynamically decide if "username" or "password" field needs focus.
The double announcements might also have blocked `alert` announcements.

The javascript focus switch is changed to always focus the "username"
field in case of login error:
* This is necessary as a focus on special `type="password"` input
  field does not give any error message announcement.
* In case of wrong username or password:
  All fields are empty on reload anyway.
* In case of password manager and correct user but wrong password:
  Results in username focused, but password wrongly prefilled.
  This should be neglectable as this happens only once on a password
  change.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 3
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/12/91512/3 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/12/91512/3 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V -1 Blocked
    • core-ci -1 CI

Merge conflicts 3

Issues 2

Files 5

Review log 47

  1. Ayke Halder uploaded patch set 1 11/11/25, 00:20

  2. Ayke Halder updated the commit message in patch set 2 11/11/25, 00:23

  3. core-ci voted on patch set 1 V +1 11/11/25, 00:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88920

  4. core-ci voted on patch set 2 V +1 11/11/25, 00:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88921

  5. Oliver Klee voted on patch set 2 CR +1 11/11/25, 08:06

  6. Benni Mack uploaded patch set 3 CR +1 V +1 11/11/26, 13:10

  7. core-ci voted on patch set 3 V -1 11/11/26, 13:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114077