[aria-hidden="true"] is present on the document <body>
How to fix the aria-hidden-body accessibility rule. ARIA.
The message you saw
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
- Run the checker on the page: this rule reports the
<body>element. - In Chrome DevTools, inspect the
<body>tag and look foraria-hidden. If it appears only after you open and close a dialog or menu, that script is the cause. - Search your code and third-party widgets (chat, consent banners, pop-up builders) for code that sets
aria-hiddenondocument.body.
How to fix it
- Remove
aria-hiddenfrom the<body>. - To hide the page behind an open dialog, use the native
<dialog>element opened withshowModal(): the browser makes everything else inert for you. - If you can’t use
<dialog>, put the dialog outside your main page wrapper and setinert(oraria-hidden="true") on that wrapper only, never on the<body>, and remove it when the dialog closes. - 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
- Checking the page once isn’t enough when the attribute is added by a script: open and close each dialog, then check again.
WCAG success criteria
When this rule fails, the page fails:
- 1.3.1 Info and Relationships (Level A, WCAG 2.0, 2.1, 2.2)
- 4.1.2 Name, Role, Value (Level A, WCAG 2.0, 2.1, 2.2)
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
[aria-hidden="true"]elements contain focusable descendents- Elements with
role="dialog"orrole="alertdialog"do not have accessible names - Document does not have a main landmark
More detail
- Deque University’s reference for aria-hidden-body (the makers of axe-core, the engine our scanner uses)
- W3C’s Understanding 1.3.1
- W3C’s Understanding 4.1.2
- All fix guides