aria-errormessage
An ARIA attribute that points from an invalid input to the element holding its error message.
In more detail
It only takes effect while aria-invalid="true" is set. Because support in screen readers has been uneven, many design systems also list the error in aria-describedby.
Related terms
- aria-invalid — An ARIA attribute that marks a form control's current value as failing validation.
- aria-describedby — An ARIA attribute that links an element to other elements, by id, whose text gives it a longer description.
- ARIA — The W3C standard of HTML attributes, such as role and aria-expanded, that tell assistive technology what a custom widget is and what state it is in.
- useId — The React hook that generates a unique ID string that is stable across renders and matches between server and browser.
Taught in
- Actionable Form Primitives: Buttons, Switches & Inputs — Design Systems & Component Engineering
- useId: Generating Stable Accessible Form Element Identifiers — React 19 & Modern Component Architecture