ARIA Hidden Body
Ensures document body is not set to aria-hidden
Ensures document body is not set to aria-hidden
| Rule ID | a11y/aria-hidden-body |
| Category | Accessibility |
| Scope | Per-page |
| Severity | error |
| Weight | 10/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
toml[rules]
disable = ["a11y/aria-hidden-body"]Disable all Accessibility rules
squirrel.toml
toml[rules]
disable = ["a11y/*"]Enable only this rule
squirrel.toml
toml[rules]
enable = ["a11y/aria-hidden-body"]
disable = ["*"]