#107724Character limit in form fields not announced for assistive technologies
Description
Description
Screen reader users do not get feedback on the character limit in form fields. The information also changes from green over yellow to red and stops editing when the character limit is reached and these color changes should also be given as textual representation for screen readers.
Reproduction steps
- Navigate to a new or existing content element
- Click on “edit record”
- Click in an input field, e.g. header, subheader
- Input text
clipboard-202510161405-no7nu.png - Input longer Text
clipboard-202510161410-02gs5.png
Impact
Users are informed by the message how many characters are allowed in the input.
Target group
Visually impaired users, screen reader users
Severity
high
Frequency
very common (every text field with length limit)
Definition of Done
When I stop typing, the information how many characters are left, must be announced by the screen reader.
When 29 characters or fewer are left, the screen reader reads: “hint: X characters are left”.
When 14 characters or fewer are left, the screen reader reads: “warning: X characters are left”.
Recommended solution
Add role="status" to the element and adjust text to contain the visually hidden text “Hint:” or “Warning:” when fewer characters are available.
References / WCAG 2.2 Reference
4.1.3 Status Messages (https://www.w3.org/WAI/WCAG22/quickref/#status-messages)
MDN: Role Status (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/status_role)
Reviews 2
Files 3
History 38
-
Benni Mack changed Sprint Focus On Location Sprint <span data-processor="relativetime" data-value="2026-08-06T16:02:37+00:00" > 08/06/26, 16:02 </span>
-
Thomas Anders commented and changed attached clipboard-202608062215-1xxey.png <span data-processor="relativetime" data-value="2026-08-06T20:22:53+00:00" > 08/06/26, 20:22 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 96884 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-19T19:20:52+00:00" > 10/19/26, 19:20 </span> -
Gerrit Code Review pushed patch set 2 for main to change 96884 <span data-processor="relativetime" data-value="2026-10-20T08:11:10+00:00" > 10/20/26, 08:11 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 96884 <span data-processor="relativetime" data-value="2026-10-20T14:55:59+00:00" > 10/20/26, 14:55 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 96884 <span data-processor="relativetime" data-value="2026-10-21T10:18:31+00:00" > 10/21/26, 10:18 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 96972 <span data-processor="relativetime" data-value="2026-10-21T12:14:35+00:00" > 10/21/26, 12:14 </span>
-
Markus Timtner commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-21T14:00:12+00:00" > 10/21/26, 14:00 </span>Applied in changeset commit:6fa43606b0bc628127cc04b9dca429400350f5a4.
In char-counter.ts, its enough to add role=“status” aria-live=“polite” aria-atomic=“true” to the remaining characters note. (aria-live/-atomic are redundant due to status)
While testing I stumbled across multiple things that should be changed.
Input with max=4, the text will be announced with the above change.
With min=4 a different template is rendered, so the above fix does nothing.
With min=4 & max=8 both templates get rendered, also with different styles:
.clipboard-202608062215-1xxey.png
In addition, the label “ Remaining characters: X “ for “min” field does not seem to be ideal, it should be something like “ X characters required “.