-
Notifications
You must be signed in to change notification settings - Fork 779
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
Axe fails with new color spec #4007
Comments
Was just about to file a similar issue, after I noticed it couldn’t parse oklab colors: My snippet specifically uses the --bgcolor: red;
background: color-mix(in oklab, var(--bgcolor), white 20%); When changing the colorspace to |
Thanks for reporting. We clearly missed something here. |
@enyo Could you elaborate on what you mean that this completely breaks your accessibility tests? I tested out the code and axe-core does not crash but instead just reports the problem as an incomplete issue of color-contrast. Are you checking the incomplete property of the axe results in your tests? |
It breaks the accessibility test in Lighthouse, which uses axe-core under the hood. See https://twitter.com/bramus/status/1655504052518637569 + follow-up tweet for an example report. |
Thanks for the added context, that helped a lot to understand what is going on. |
@straker exactly as @bramus said: it breaks my lighthouse tests, and so I can’t use the color because then I just don’t get a meaningful result (and I wouldn’t settle for anything less than 100 anyway 😉) I too reverted to using basic colors but I’d love to use the new ones because they are just more vibrant on displays that support them. |
@straker wow! Thanks for the quick fix. Do you know when this will be available on pagespeed.web.dev? |
@enyo Can't say for certain but I feel that they do a good job of keeping up-to-date on patch releases. |
Validated with the lates axe-core develop branch code base, now not seeing failures for color combinations, like hwb(), lab(), lch(), oklab(), and oklch(). Screen.Recording.2023-05-25.at.11.28.34.AM.mov |
Still have this issue. You can run test lighthouse on evilmartians.com which is will fails. They have only oklch colors. |
@wokalek I tested the page with [email protected] and it doesn't break the color contrast test. Looks like lighthouse pulled in 4.7.2 a few weeks ago. I tried to run lighthouse on the page but it just freezes on "Lighthouse is warming up..." |
I know this issue with "Lighthouse is warming up...", that's another (: You can |
@straker |
I just tested on PageSpeed Insights and my oklch colors finally pass! :) |
Product
axe-core
Product Version
No response
Latest Version
Issue Description
Expectation
I’m using
oklch
on my page. I have added a media query to test if the browser supports it, and fall back torgb()
if not. I expectaxe-core
to either ignore myoklch
definitions, or be able to parse them properly.Actual
axe-core
fails with:axe-core Error: Unable to parse color "oklch(0.992 0.03 171.25)”
How to Reproduce
Additional context
This prevents me from using the new color syntax since my accessibility tests completely break.
The text was updated successfully, but these errors were encountered: