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 an axe warning as an error #623
Comments
Signed-off-by: Ivan Boothe <git@rootwork.org>
…can be navigated Signed-off-by: Ivan Boothe <git@rootwork.org>
I’m seeing this same issue, the problem is that pa11y is reporting “review items” from axe as errors. From the Axe documentation, we can see that axe returns two types of issues,
Looking at the code in Lines 147 to 150 in 9cf10d4
Within the function, the issue Lines 168 to 169 in 9cf10d4
This will cause the issue to have a This should probably be changed so that |
Hey I know this is old, am I missing something here or is this just a one-line fix? Line 169 in 9cf10d4
|
Thanks @rootwork for your fantastic description and @dboulet @daemoncron for zeroing in on the issue. Looking into this. |
Expected behaviour
When an axe rule can't determine something, it should be reported as a warning, not an error. If that sounds vague, it's because I'm trying to extrapolate from the rule on which I see this happening to generalize about any rule in which axe reports
x
could not be determined due toy
.The specific rule in this case is color-contrast. You'll see toward the bottom of that definition page it says:
For instance, if an element has a gradient background (which is a type of background-image in CSS) overlaid with text, looking at it using the axe browser extension it will say:
When pa11y receives a notice like this, it should consider it a warning, not an error.
Actual behaviour
Instances like this are reported as errors:
Steps to reproduce
Unfortunately running pa11y (or axe-core/cli) against a CodePen doesn't really work, but here's some really simple code to test:
https://codepen.io/rootwork/pen/zYPwQbv
If you inspect that using axe's browser extension, you'll see the warning noted above.
In my case I was running pa11y locally using
pa11y --runner axe http://localhost:9050/
against a page that had similar a text-on-gradient section.Finally, if I'm wrong about diagnosing this issue and it's actually a problem with axe-core/cli, please accept my apologies and I'll re-report it over there.
Environment:
The text was updated successfully, but these errors were encountered: