Skip to content

aria-hidden-body

Reports aria-hidden="true" on <body>.

The attribute removes an element and all of its content from the accessibility tree, so on <body> the whole page is hidden from screen readers while it still shows on screen.

To fix, remove the attribute. To hide only a part of the page, put it on that part.

Reported
...
<head>
...
</head>
<body aria-hidden="true">
...
<h2><img src="a.png" alt="x"></h2>
<h3>text</h3>
...
angular:
lint:
rules:
aria-hidden-body: warn # off (default), warn, error
html:
lint:
rules:
aria-hidden-body: warn # off (default), warn, error
svelte:
lint:
rules:
aria-hidden-body: warn # off (default), warn, error
vue:
lint:
rules:
aria-hidden-body: warn # off (default), warn, error

Enabled by the presets: html/html-validate-recommended.

Suppress one line with sudsy-disable-next-line aria-hidden-body in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
html-eslint no-aria-hidden-body full
html-validate aria-hidden-body full