These docs are for CORA 0.10, an older release. Read this page in the newest docs.
Hidden content needs to be checked when it shows
- Rule:
axe/hidden-content - Checks: Hidden content on the page should be analyzed
- WCAG: none; a best practice, not a WCAG success criterion
- Fix class:
manual: A fix needs a person to work out what to change, beyond authored text or a visual decision.
Who it affects
Section titled “Who it affects”- People who use a screen reader or a braille display, most of them blind.
- People who use a keyboard or a switch device instead of a mouse.
How to fix it
Section titled “How to fix it”A menu, a dialog, a tab panel or a collapsed section was hidden during the scan
Section titled “A menu, a dialog, a tab panel or a collapsed section was hidden during the scan”This reports content the scan could not check, not a fault: axe skips content hidden with display: none or visibility: hidden. Open or expand it, then scan the page in that state.
The content is meant to stay hidden, such as an inactive view or a template
Section titled “The content is meant to stay hidden, such as an inactive view or a template”Leave it. The hidden attribute and display: none are the right ways to hide content from everyone.
Fixes that fail
Section titled “Fixes that fail”Moving the content off-screen or giving it opacity: 0 so that axe checks it
Section titled “Moving the content off-screen or giving it opacity: 0 so that axe checks it”axe can then check it, but screen readers read it and its controls take focus while nothing shows on screen.
More on the rule
Section titled “More on the rule”axe-core’s documentation of the rule
CORA’s fix guidance adapts content from accessibility-agents, under the MIT License: see its notice.