Skip to main content
Ensures document body is not set to aria-hidden
Rule IDa11y/aria-hidden-body
CategoryAccessibility
ScopePer-page
Severityerror
Weight10/10

Solution

Never set aria-hidden=‘true’ on the <body> element. This makes the entire page invisible to assistive technology. If you need to hide content when a modal is open, add aria-hidden to sibling elements of the modal, not to body.

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["a11y/aria-hidden-body"]

Disable all Accessibility rules

squirrel.toml
[rules]
disable = ["a11y/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["a11y/aria-hidden-body"]
disable = ["*"]