Skip to content

ariaRoleValidity

Reports invalid or abstract ARIA roles.

✅ This rule is included in the jsx logical preset.

ARIA roles must be valid according to the WAI-ARIA specification. Abstract roles and invalid role values cannot be used, as they have no meaning to assistive technologies. This rule reports on any DOM element given a JSX role attribute with an invalid value.

This is required for WCAG 4.1.2 compliance.

<div role="datepicker" />
<div role="range" />
<div role="" />

If you’re using custom ARIA roles or working with experimental features, you may need to disable this rule.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.