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:

Rule details

Examples of incorrect code for this rule:

<input type="hidden" aria-label="foobar">
error: "aria-label" cannot be used on this element (aria-label-misuse) at inline:1:22:
> 1 | <input type="hidden" aria-label="foobar">
    |                      ^^^^^^^^^^


1 error found.

Examples of correct code for this rule:

<input type="text" aria-label="foobar">