aria-hidden-body
Web validation
aria-hidden="true" must not be used on the <body> element.Adding aria-hidden="true" to <body> removes every descendant from the accessibility tree. Assistive-technology users encounter an empty page and cannot perceive or operate the site. Although some modern browsers silently repair this mistake, support is inconsistent, so authors must remove the attribute.
Pass Patterns
No aria-hidden on the body element
The page is fully exposed to assistive technology.
<body>
<!-- Complete page content -->
</body>Fail Patterns
aria-hidden set to true on the <body> element
All content is hidden from the accessibility tree.
<body aria-hidden="true">
<!-- Page content (inaccessible) -->
</body>Try It Yourself
Inspecting the browser dev-tools
- Open the page.
- Open developer tools and switch to the Accessibility panel (sometimes under Elements → Accessibility tree).
- Select the
<body>element.
Expected result: aria-hidden is not present on <body>, and child nodes appear in the accessibility tree.
Actual result: aria-hidden="true" is present on <body>. In browsers that do not auto-repair, no child nodes appear; in browsers that do, children appear, but the markup still fails the rule.
Using a screen reader
New to screen reader testing, or need a refresher?
Review this article first: Practical guides for using screen readers
Use a browser that does not auto-repair aria-hidden on <body>; otherwise the page may be announced normally even though the markup fails.
- Load the page and open a screen reader.
- Move to the top of the document (for example, press Ctrl + Home).
- Try to navigate by headings or links.
Expected result: The page content is announced normally.
Actual result: Nothing is announced because the entire document is absent from the accessibility tree.
FAQ
How does this issue relate to 4.1.2 Name, role, value?
SC 4.1.2 requires that user-interface components expose their name, role, state, and value. Hiding the entire <body> prevents every component from being exposed, directly failing the criterion.
Why is this issue marked as Critical?
With the entire page hidden, assistive-technology users cannot perceive content, move focus, or execute controls. This blocks all tasks, representing a complete loss of functionality across browsers and devices.
Standards and Regulations
| Standard | Success Criterion | Reference |
|---|---|---|
| WCAG 2.2 | 4.1.2 Name, Role, Value (A) | For all user interface components, the name and role can be programmatically determined; states, properties, and values that can be set by the user can be programmatically set; and notification of changes to these items is available to assistive technologies. |
| EN 301 549 | 9.4.1.2 Name, Role, Value | Same as the WCAG text. |