[aria-hidden="true"] is present on the document <body>

How to fix the aria-hidden-body accessibility rule. ARIA.

The message you saw

Lighthouse and PageSpeed Insights
[aria-hidden="true"] is present on the document <body>
axe-core, axe DevTools and this checker
aria-hidden="true" must not be present on the document body (rule aria-hidden-body)

Lighthouse runs axe-core inside it, so both are the same check, and the fix below works whichever tool showed you the message.

What it means

aria-hidden="true" hides an element and everything inside it from screen readers. Put on the <body>, it hides the entire page. A screen reader then has nothing to read, even though the page looks normal.

This is rarely written on purpose. It usually comes from a script for dialogs, menus or cookie banners that hides “the rest of the page” while something is open, and either aims at the <body> (which also contains the dialog) or never removes the attribute when the dialog closes.

Who is affected

aria-hidden="true" is on the <body>, which hides the whole page from screen readers even though it looks normal.

Blind and low-vision people using a screen reader. Depending on the screen reader and browser, the page is silent, or reads in a confused way, while sighted people see nothing wrong. It can make a whole site unusable for them.

How to find it

  1. Run the checker on the page: this rule reports the <body> element.
  2. In Chrome DevTools, inspect the <body> tag and look for aria-hidden. If it appears only after you open and close a dialog or menu, that script is the cause.
  3. Search your code and third-party widgets (chat, consent banners, pop-up builders) for code that sets aria-hidden on document.body.

How to fix it

  1. Remove aria-hidden from the <body>.
  2. To hide the page behind an open dialog, use the native <dialog> element opened with showModal(): the browser makes everything else inert for you.
  3. If you can’t use <dialog>, put the dialog outside your main page wrapper and set inert (or aria-hidden="true") on that wrapper only, never on the <body>, and remove it when the dialog closes.
  4. If a third-party script does it, update or configure it, or report it to the vendor.

Example

Before

<body aria-hidden="true">
  <div class="page">…</div>
  <div role="dialog" aria-label="Newsletter">…</div>
</body>

After

<body>
  <div class="page" inert>…</div>
  <div role="dialog" aria-label="Newsletter">…</div>
</body>

Common mistakes

WCAG success criteria

When this rule fails, the page fails:

Check your fix

Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools. Scan again after your change: when the rule no longer appears under the problems, the fix worked.

An automated pass means this rule found nothing wrong. It doesn’t prove the page is accessible: some of what WCAG asks for needs a person to check, and the report’s manual checklist lists those steps.

Related fix guides

More detail