Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1015 Bytes

aria-role.md

File metadata and controls

36 lines (24 loc) · 1015 Bytes

aria-role

The ARIA roles model requires that elements with a role attribute use a valid, non-abstract ARIA role. Each non-abstract ARIA role is mapped on to a known set of behavior by the user agent or assistive technology, so using an unknown role will result in the desired behavior not being available to the user.

You can find a list of valid ARIA roles, along with descriptions and information on additional required attributes, on the WAI-ARIA site.

options

This rule takes no options

Passes

// passes when there is a role and it is valid
<div role="button"></div>

// passes when there is no `role`
<div></div>

Fails

// fails when there is an invalid `role`
<div role="foo"></div>

See also