Accessibility
aria-validation
Forbid invalid ARIA roles and unknown aria-* attributes.
Validates ARIA usage against WAI-ARIA 1.2: catches typos in role names ("buton"), unknown aria-* attributes, and required-attribute combinations the model forgets. AI generators frequently invent plausible-looking ARIA that is not in the spec.
Behavior
- Fixable: No.
- Suggestions: No.
- Maps to: WCAG 4.1.2 (Name, Role, Value).
Examples
Bad:
<div role="buton" />Good:
<div role="button" tabIndex={0} />Related rules
focus-visible-styleBlock outline-none unless a replacement focus indicator is present.form-labelsEvery form input must have an associated label.prefer-semantic-htmlPrefer semantic HTML over <div onClick> and redundant ARIA roles.
Use it
Enable aria-validation in your eslint.config.js:
import deslint from '@deslint/eslint-plugin';
export default [
{
plugins: { deslint },
rules: {
'deslint/aria-validation': 'error',
},
},
];Found a false positive? Report it on GitHub →