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

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 →

Back to all rules