Disallow usage of abstract WAI-ARIA roles

Rule ID:
no-abstract-role
Category:
Accessibility
Standards:
  • WAI ARIA

WAI-ARIA defines a list of abstract roles which cannot be used by authors:

Typically one of the role subclasses should be used instead.

Rule details

Examples of incorrect code for this rule:

<div role="landmark"></div>
error: Role "landmark" is abstract and must not be used (no-abstract-role) at inline:1:12:
> 1 | <div role="landmark"></div>
    |            ^^^^^^^^


1 error found.

Examples of correct code for this rule:

<div role="navigation"></div>

Version history