We'd like to set Google Analytics cookies to learn how people use the Knowledge Base, so we can improve it. We set them only if you accept.

Skip to main content
Digital Accessibility Knowledge Base

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.

HTML
<body>
    <!-- Complete page content -->
</body>

Fail Patterns

aria-hidden set to true on the <body> element

All content is hidden from the accessibility tree.

HTML
<body aria-hidden="true">
    <!-- Page content (inaccessible) -->
</body>

Try It Yourself

Inspecting the browser dev-tools

  1. Open the page.
  2. Open developer tools and switch to the Accessibility panel (sometimes under Elements → Accessibility tree).
  3. 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.

  1. Load the page and open a screen reader.
  2. Move to the top of the document (for example, press Ctrl + Home).
  3. 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

StandardSuccess CriterionReference
WCAG 2.24.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 5499.4.1.2 Name, Role, ValueSame as the WCAG text.

Personas impacted by this issue