Skip to main content

no-invalid-aria-prop-value

Warns when an ARIA property or state value does not conform to its expected type.

The names of ARIA attributes are compared as no-unknown-attr compares names (see its "Attribute name case" section): ARIA-LABEL is the same attribute as aria-label where the DOM treats attribute names as case-insensitive, such as on an HTML element, and a different one where it does not, such as on an <svg> element in JSX.

❌ Examples of incorrect code for this rule

<div role="button" aria-pressed="hoge"></div>

✅ Examples of correct code for this rule

<div role="button" aria-pressed="true"></div>

Interface​

{
"no-invalid-aria-prop-value": boolean
}

Default Severity​

error