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

Stacking order bug causes color-contrast to misidentify background #4540

Open
WilcoFiers opened this issue Jul 16, 2024 · 0 comments
Open

Stacking order bug causes color-contrast to misidentify background #4540

WilcoFiers opened this issue Jul 16, 2024 · 0 comments
Labels
color contrast Color contrast issues fix Bug fixes rules Issue or false result from an axe-core rule support
Milestone

Comments

@WilcoFiers
Copy link
Contributor

The following should pass:

<style>
  #container {
    position: fixed;
    background-color: #333;
    padding: 0.5em 2em;
  }
  #target {
    filter: contrast(100%);
    color: #eee;
  }
</style>
<div id="container">
  <span id="target"> Hello world </span>
</div>

There's some bug in createGrid() which results in the stacking order of #target to be calculated incorrectly. This comes from the filter property. Removing that avoids the issue. This is going to require a very close read of the CSS spec to figure out.

@WilcoFiers WilcoFiers added fix Bug fixes rules Issue or false result from an axe-core rule color contrast Color contrast issues support labels Jul 16, 2024
@WilcoFiers WilcoFiers added this to the Axe-core 4.11 milestone Jul 16, 2024
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 rules Issue or false result from an axe-core rule support
Projects
None yet
Development

No branches or pull requests

1 participant