role attributes have at least one valid value
This rule tests conformance of the following accessibility requirements:
This rule checks that each
role attribute has at least one valid token.
This rule makes the following assumption:
This rule has the following accessibility support concern:
- There exists a known popular browser that treats the value of the
roleattribute as case-sensitive. Inconsistencies between browsers can therefore arise if the
roleattribute has a value containing uppercase letters.
<div role="button" tabindex="0">This is a button</div>
<div role="btn button" tabindex="0">This is a button</div>
<div role="btn" tabindex="0">This is a button</div>
This element has no
role attribute and is therefore inapplicable:
<button>This is a button</button>
<button role="">This is a button</button>
This document includes material copied from or derived from https://www.w3.org/WAI/standards-guidelines/act/rules/674b10/proposed/. Copyright © 2023 W3C® (MIT, ERCIM, Keio, Beihang).