ARIA States & Properties
aria-errormessage
Identifies an error message associated with an invalid control. Use with aria-invalid=true when the error is relevant; keep error content available and update both when corrected. Provide visible errors and test screen-reader behavior. Value type: ID reference. Accepted values: ID of error message. Default or omitted behavior: none. Applicable context: roles supporting the property; invalid state required for relevant error. Use only where allowed for the element’s implicit or explicit role. ARIA describes accessibility semantics; it does not automatically implement the associated behavior. Test with the relevant browser and assistive technology.
Formal Syntax & Structure
html syntaxhtml
aria-errormessage="error"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| aria-errormessage | ID reference | Accepted values: ID of error message. Default or omitted behavior: none. Context: roles supporting the property; invalid state required for relevant error. Requiredness depends on the role. |
Working Example
Example Snippethtml
<label for="email">Email</label><input id="email" type="email" aria-invalid="true" aria-errormessage="error" value="wrong"><p id="error">Enter a complete email address.</p>