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

Contrast Ratio error, but the text element in question is on top of an image #207

Open
jyurek opened this issue Sep 16, 2021 · 1 comment
Assignees
Labels
in sprint Ticket is in current sprint PRIORITY: moderate Moderate priority item; should be scheduled within a few weeks web-apis

Comments

@jyurek
Copy link

jyurek commented Sep 16, 2021

  • Link to live demo (if applicable)

- `axe-core-rspec` version: 4.2.1
- Testing with chromedriver, Chrome 93

I have a section that has a background image that is fairly dark. On top of this is a transparent p that contains an a with the text "Application Info`, which also has a transparent background -- that is, the background is very evident directly behind the text. The text itself is color #6dccf6. The image background is defined as

      background: no-repeat top left / cover url(asset-path("hero-background.jpg")) #000000;

I get the error:

               Selector: a[href="\#"]:nth-child(2)
               HTML: <a href="#">Application Info</a>
               Fix any of the following:
               - Element has insufficient color contrast of 1.8 (foreground color: #6dccf6, background color: #ffffff, font size: 9.0pt (12px), font weight: bold). Expected contrast ratio of 4.5:1

But there is nothing behind the a that has a background color of #ffffff. Incidentally, there is other text inside the p that is color: #ffffff and is not getting this error.

Why am I getting this specific error when I should not be?

@dequejenn dequejenn added PRIORITY: moderate Moderate priority item; should be scheduled within a few weeks in sprint Ticket is in current sprint labels Jan 29, 2024
@michael-siek
Copy link
Member

Hey @jyurek just following up to see if this is still an issue with axe-core-gems 4.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in sprint Ticket is in current sprint PRIORITY: moderate Moderate priority item; should be scheduled within a few weeks web-apis
Projects
None yet
Development

No branches or pull requests

3 participants