Disallow aria-hidden from being set on <body>

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

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

Rule details

Examples of incorrect code for this rule:

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


1 error found.

Examples of correct code for this rule:

<body></body>

Options

This rule takes no options.

Version history

-- 6.3.0 - Rule added.