Skip to content

Color contrast does not accurately assess overflow #2806

@WilcoFiers

Description

@WilcoFiers

This code causes a color contrast issue to be reported, even though the element with low contrast is hidden because of overflow. This type of thing can happen in carousels for example, when the opacity is reduced as the end state of a fade-out effect.

<style>
  .container {
    width: 200px;
    height: 200px;
    overflow: hidden;
  }
  .foo * {
    width: 200px;
    height: 200px;
  }
  #two {
    color: #eee;
  }
</style>
<div class="container">
  <div class="foo" id="foo">
    <div id="one">hello</div>
    <div id="two">goodbye</div>
  </div>
</div>

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