Other Description: aria-invalid and aria-errormessage properties
aria-errormessage
must be used in conjunction with aria-invalid
or the invalid
state of standard HTML form controls. When a control is identified as invalid the content referenced will be spoken by the screen reader.
The coding is similar to aria-describedby
property. The difference is the accessible description can be configured by the user not to be spoken, the use of aria-errormessage
is intended to always be spoken by a screen reader when the invalid state is set.
Screen Reader Expectations
- When form control or widget has valid value, screen reader announces nothing.
- When form control or widget has invalid value, screen reader announces control has invalid value.
- When form control or widget has invalid value, screen reader announces referenced message.
Implementation
Expectation | NVDA for Windows | JAWS for Windows | VoiceOver for macOS |
---|---|---|---|
No announcement when valid. | Yes | Yes | Yes |
Announcement when invalid. | Yes | Yes | Yes |
Referenced message announced when invalid. | no | Yes | no |