ARIA States & Properties

aria-invalid

Build a form with the HTML form generator

Indicates that a value does not satisfy the expected format or validation rules. Use after validation, not simply because a required field is initially empty. Pair with clear error feedback; it does not perform validation. Value type: token. Accepted values: false, true, grammar, spelling. Default or omitted behavior: false. Applicable context: supported input roles; global use deprecated on some roles in ARIA 1.2. 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-invalid="true"

Parameters & Attributes

NameTypeDescription
aria-invalidtokenAccepted values: false, true, grammar, spelling. Default or omitted behavior: false. Context: supported input roles; global use deprecated on some roles in ARIA 1.2. Requiredness depends on the role.

Working Example

Example Snippethtml
<label for="zip">Postal code</label><input id="zip" value="?" aria-invalid="true" aria-describedby="err"><p id="err">Enter a valid postal code.</p>
HTML Reference