-
Notifications
You must be signed in to change notification settings - Fork 253
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
pa11y reports false positives for color contrast #633
Comments
I'm starting to this see this too. Getting a dozen errors on every page about this but testing with the color contrast analyzer app proves they pass |
Could you please provide a publicly-accessible example page that contains this problem that we can test? Thanks. |
And using the axe runner. |
Thanks but without some code to test there's no way for us to replicate the issue and determine if it's a problem in pa11y or in axe. Feel free to update this issue if you manage to create a reduced test case in Codepen or a similar place and we'll have a look. |
Here's another website we have I was able to test https://www.pandemicoversight.gov/ |
See that pa11y is using axe-core 4.2 but they're on 4.4 wonder if that could be it |
dequelabs/axe-core#3431 opened this too for axe |
In some cases, when axe can’t determine the contrast ratio for certain elements, for example if the element has a background image or contains a pseudo-element, it will report the issue as “needs review”. The problem is that pa11y is currently reporting these review items as errors, as described in #623. |
Expected behaviour
On the two pages that I'm testing, I'm expecting zero accessibility issues.
Actual behaviour
I'm getting 16 issues on these two pages, all related to color contrast. I've introduced a wait of 2000ms to ensure the pages are entirely loaded, and captured screenshots to verify that the pages are in the correct state.
The following is an issue on the login page:
However, when I use Chrome DevTools to analyze the color contrast, it has a 7.33:1 ratio.
This is the screenshot captured by pa11y during the test:
![login-screen](https://user-images.githubusercontent.com/17525979/161309955-f066c89b-9711-42ab-93a5-443f8bbe5f09.png)
Steps to reproduce
Running pa11y with the
axe
test runnerEnvironment:
The text was updated successfully, but these errors were encountered: