Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color contrast does not accurately assess overflow #2806

Closed
WilcoFiers opened this issue Feb 16, 2021 · 3 comments
Closed

Color contrast does not accurately assess overflow #2806

WilcoFiers opened this issue Feb 16, 2021 · 3 comments
Assignees
Labels
color contrast Color contrast issues fix Bug fixes pr A pr has been created for the issue rules Issue or false result from an axe-core rule
Milestone

Comments

@WilcoFiers
Copy link
Contributor

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>
@WilcoFiers WilcoFiers added fix Bug fixes rules Issue or false result from an axe-core rule color contrast Color contrast issues labels Feb 16, 2021
@WilcoFiers WilcoFiers added this to the axe-core 4.2 milestone Feb 16, 2021
@WilcoFiers WilcoFiers modified the milestones: axe-core 4.2, axe-core 4.3 Mar 24, 2021
@waabid
Copy link
Contributor

waabid commented Apr 27, 2021

Hi Wilco,

We're seeing the transition issue as well. Here's a simple codepen that can repro it: https://codepen.io/dbjorge/pen/mdRopqe

The related issue on our end pertains to a carousel specifically, here: microsoft/accessibility-insights-web#4144

@WilcoFiers
Copy link
Contributor Author

Unfortunately this hasn't quite made the cut for 4.3. We'll push it to 4.4.

@WilcoFiers WilcoFiers modified the milestones: axe-core 4.3, Axe-core 4.4 Jul 7, 2021
@WilcoFiers WilcoFiers modified the milestones: Axe-core 4.4, Axe-core 4.5 Jan 24, 2022
codecademydev pushed a commit to Codecademy/client-modules that referenced this issue Mar 7, 2022
There was some css added to monaco-editor that allowed cypress tests to pass without axe issues.  But this caused a bug with lines below the set height to not be shown in the editor.   Here, I've removed that css, and I've made a PR to monolith that skips that axe check until we are able to add it back in DISC-529.  Root cause: dequelabs/axe-core#2806
@straker straker added the pr A pr has been created for the issue label Sep 26, 2022
@padmavemulapati
Copy link

Validated with the latest develop branch axe-core code base,
the test script:

<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>

is passing color-contrast rule

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color contrast Color contrast issues fix Bug fixes pr A pr has been created for the issue rules Issue or false result from an axe-core rule
Projects
None yet
Development

No branches or pull requests

4 participants