Disallow aria-hidden from being set on <html>

Rule ID:
aria-hidden-html
Category:
Accessibility
Standards:
  • WCAG 2.2 (A)
  • WCAG 2.1 (A)
  • WCAG 2.0 (A)
Fixable:
Yes

Requires aria-hidden is not used on the <html> element.

Rule details

Examples of incorrect code for this rule:

<html aria-hidden="true"></html>
error: aria-hidden must not be used on <html> (aria-hidden-html)
> 1 | <html aria-hidden="true"></html>
    |       ^^^^^^^^^^^


1 error found.
1 error potentially fixable with the `--fix` option.

Examples of correct code for this rule:

<html></html>

Options

This rule takes no options.

Version history