Disallow aria-label
misuse (aria-label-misuse
)
aria-label
is used to set the label of an element when no native text is present or non-descriptive.
The attribute can only be used on the following elements:
- Interactive elements
- Labelable elements
- Landmark elements
- Elements with roles inheriting from widget
<area>
<form>
and<fieldset>
<iframe>
<img>
and<figure>
<summary>
<table>
,<td>
and<th>
Rule details
Examples of incorrect code for this rule:
<input type="hidden" aria-label="foobar">
Examples of correct code for this rule:
<input type="text" aria-label="foobar">