dequelabs / dequelabs/axe-core

Option to ignore twice-hidden elements in a11y text algorithm

Open
#1,348 2 comments 0 reactions 0 assignees View on GitHub
commons feat
Dominant language
JavaScript
Stars
7.5k
Forks
933
Avg merge
2d 13h
Merged PRs (30d)
29

Description

The following code gives a different result in Chrome than it does in Firefox and Safari:

```html


A label
that
is
super
.hidden {}

```

- Chrome 72: "A label"
- Firefox 62: "A label that is super .hidden{}"
- Safari 12.0: "A label that is super .hidden{}"

In the new a11y computation axe will produce the Firefox / Safari result, but there are use cases where it's beneficial to produce the Chrome result. It'd be good to have an `ignoreTwiceHidden` option to allow returning this minimal text.

Contributor guide

Open the contributing guide

Research direction

Start from the new accessibility text computation and reproduce the HTML example to compare its output with Chrome, Firefox, and Safari. The work is done when an `ignoreTwiceHidden` option returns the minimal text, such as "A label", for the reported use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
accessibility
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.