Start scanning free

( Robust / WCAG 4.1.2 )

aria-hidden="true" is present on the document body

This check maps to Name, Role, Value. Use the guidance below to confirm the issue, understand who it affects and ship a fix.

Critical Level A WCAG 4.1.2 — Name, Role, Value

What’s wrong

The <body> element has aria-hidden="true", which hides the entire page from assistive technology.

Why it matters

This usually happens by accident, a modal library sets aria-hidden on everything outside the dialog and fails to clean up, or leaves it applied when the dialog closes. Screen reader users end up with a blank page and no way to navigate anything.

How to fix it

Never set aria-hidden directly on <body>. If you’re hiding background content while a modal is open, target a wrapper element around the main content instead, and always remove the attribute when the modal closes.

Before
<body aria-hidden="true">
  <div id="app">...</div>
  <div class="modal">...</div>
</body>
After
<body>
  <div id="app" aria-hidden="true">...</div>
  <div class="modal">...</div>
</body>

Learn more