Indicates the entered value does not conform to the format expected by the application. See related aria-errormessage.
If the value is computed to be invalid or out-of-range, the application author SHOULD set this attribute to true. User agents SHOULD inform the user of the error. Application authors SHOULD provide suggestions for corrections if they are known.
When the user attempts to submit data involving a field for which aria-required is true, authors MAY use the aria-invalid attribute to signal there is an error. However, if the user has not attempted to submit the form, authors SHOULD NOT set the aria-invalid attribute on required widgets simply because the user has not yet entered data.
For future expansion, the aria-invalid attribute is an enumerated type. Any value not recognized in the list of allowed values MUST be treated by user agents as if the value true had been provided. If the attribute is not present, or its value is false, or its value is an empty string, the default value of false applies.
Example coming soon
Used in Roles
- All elements of the base markup
- One of a limited set of allowed values. An explicit value of undefined for this type is the equivalent of providing no value
- A grammatical error was detected.
- false (default)
- There are no detected errors in the value.
- A spelling error was detected.
- The value entered by the user has failed validation.
No HTML element equivalent.