Web accessibility requirements state that ARIA attributes starting with aria- must contain valid values. These values must be spelled correctly and correspond to values that make sense for a particular attribute in order for the necessary accessibility function to be performed.
ARIA attributes that have invalid values can create accessibility issues for multiple users.
Ensure the value inside each attribute is spelled correctly and corresponds to a valid value.
For example, aria-hidden=”true” would pass, but aria-hidden=”rtue” would fail, as would aria-hidden=”pizza”.
As another example, the checkbox role only has three possible values: true, false, or mixed. Using any value other than one of those three will prevent the checkbox from functioning as intended
Value Types
It’s helpful to keep the following allowed state or property value types in mind:
Undefined Value: The “undefined” value, when allowed on a state or property, is an explicit indication that the state or property is not set. The value is used on states and properties that support tokens, and the “undefined” value is a string that is one of the allowed tokens. It is also used on some states and properties that accept true/false values, when “undefined” has a different meaning than “false”.
These are generic types for states and properties, but do not define specific representation. See State and Property Attribute Processing for details on how these values are expressed and handled in host languages.
Default Value and Implicit Value for Role: Many states and properties have default values. Occasionally, the default value when used on a given role should be different from the usual default. Roles that require a state or property to have a non-standard default value indicate this in the “Implicit Value for Role”. This is expressed in the form “state or property name is new default value”. Roles that define this have the new default value for the state or property if the author does not provide an explicit value.
State and Property Values Reference: For complete information about allowed values, refer to the table of characteristics for each individual attribute at W3C WAI-ARIA 1.1 Supported States and Properties.
For more examples, visit W3C’s GitHub’s ATC Rules library.