Skip to content

jsx_a11y/role-has-required-aria-props Correctness ​

What it does ​

Enforces that elements with ARIA roles must have all required attributes for that role.

Why is this bad? ​

Certain ARIA roles require specific attributes to express necessary semantics for assistive technology.

Example ​

Examples of incorrect code for this rule:

jsx
<div role="checkbox" />

Examples of correct code for this rule:

jsx
<div role="checkbox" aria-checked="false" />

References ​

Released under the MIT License.