Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 1.09 KB

no-invalid-aria-attributes.md

File metadata and controls

29 lines (19 loc) · 1.09 KB

no-invalid-aria-attributes

✅ The extends: 'recommended' property in a configuration file enables this rule.

ARIA attributes are used to provide an element with specific accessibility functions. An ARIA attribute is invalid if its name or values are either misspelled or do not currently exist in the WAI-ARIA States and Properties spec.

This rule disallows the use of invalid ARIA attributes.

Examples

This rule forbids the following:

<input type="text" aria-not-real="true" />
<div role="region" aria-live="bogus">Inaccessible live region</div>
<button type="submit" disabled="true" aria-disabled="123">Submit</button>

This rule allows the following:

<input type="text" aria-required="true" />
<div role="region" aria-live="polite">Accessible live region</div>',
<button type="submit" aria-invalid={{if this.hasNoSpellingErrors "false" "spelling"}}>Send now</button>

References