dequelabs / dequelabs/axe-core
Consider treating aria-hidden, non-tabbable, off screen elements hidden for everyone
- Dominant language
- JavaScript
- Stars
- 7.5k
- Forks
- 933
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 29
Description
Axe-core currently only considers `display none`, `visibility hidden` and `inert` elements as hidden to everyone. But content authors who ensure an element is off screen, not tabbable, not not in the accessibility tree have essentially done the same thing:
```html
.sr-only {
position: fixed;
top: 0;
left: 0;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
}
```
I think elements like this should be considered hidden to everyone, and so should get ignored by rules unless they have `excludeHidden: false` set. This impacts quite a lot of rules, so probably something not something we want to put out in a patch.
Contributor guide
Research direction
Start by tracing how axe-core currently identifies display-none, visibility-hidden, and inert elements as hidden to everyone, then locate the shared logic used by rules honoring excludeHidden. Review the affected rules and their tests, and define completion as off-screen, non-tabbable, aria-hidden content being ignored by default while remaining included when excludeHidden is false.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- accessibility
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100