Skip to content

element with 'overflow: hidden' still has children spans reported in color-contrast violations #3247

@karanbirsingh

Description

@karanbirsingh

Product: axe-core

Expectation: If a span is visually hidden because its parent specifies "overflow: hidden", the span should be excluded from color contrast results.

Actual: axe-core reports color-contrast violations on hidden spans in the following codepen: https://codepen.io/karansin/pen/QWMOKbj

Motivation: We (Accessibility Insights) received a report from a user whose website looks something like the codepen. The color-contrast result is correct in one sense (the foreground & background are too close), but the elements are hidden. The reporting user expects the hidden spans to be excluded from color-contrast results. Does this seem like a false positive? Thanks!


axe-core version: 4.3.2, and a locally built axe.min.js from develop
commit 112b960ee95b6a6abfb38a15b7092d9847512f0f

Browser and Assistive Technology versions
Chrome 95.0.4638.54
Windows

Metadata

Metadata

Assignees

Labels

color contrastColor contrast issuesfixBug fixesprA pr has been created for the issuerulesIssue or false result from an axe-core rule

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions