Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.16 KB

File metadata and controls

44 lines (30 loc) · 1.16 KB

Linter Rule: No aria-hidden on <body>

Rule: html-no-aria-hidden-on-body

Description

Prevent usage of aria-hidden on <body> tags.

Rationale

The aria-hidden attribute should never be present on the <body> element, as it hides the entire document from assistive technology users. This makes the entire page completely inaccessible to screen reader users, which is a critical accessibility violation.

Examples

✅ Good

<body>
  <main>Content</main>
</body>

<body class="app" id="main">
  <main>Content</main>
</body>

🚫 Bad

<body aria-hidden>
  <main>Content</main>
</body>

<body aria-hidden="true">
  <main>Content</main>
</body>

References