Opened 2 hours ago

Last modified 2 hours ago

#36640 new Cleanup/optimization

Error messages should use aria-errormessage

Reported by: Tobias Bengfort Owned by:
Component: Forms Version: 5.2
Severity: Normal Keywords: accessibility, ui, forms
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: yes

Description (last modified by Tobias Bengfort)

#32819 added aria-describedby to associate help texts and errors with their inputs. I recently learned that there is also the more specialized aria-errormessage.

I am not sure if using aria-describedby over aria-errormessage was a conscious decision.

One issue might be that aria-errormessage seems to be intended for client side validation. It must be used with aria-invalid="true". See also https://github.com/w3c/aria/issues/2048 for a discussion of the differences between aria-describedby and aria-errormessage.

Change History (1)

comment:1 by Tobias Bengfort, 2 hours ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top