Accessibility issue checker ignores prefers-contrast CSS rules when evaluating element contrast
Categories
(DevTools :: Accessibility Tools, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: alexschrod, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0
Steps to reproduce:
Have a page with white background and a foreground color of #4075f0. This gets reported by Firefox as having a contrast of 4.18 and thus not meeting WCAG standards. Add a @media (prefers-contrast: more) with a color that increases contrast to over 4.5, which meets WCAG guidelines (in my case, I used #316bf2).
Actual results:
Firefox still reports the contrast as bad.
Expected results:
Firefox should understand that a @media (prefers-contrast: more) that provides a higher contrast value for the given element's color should be what contrast is checked against and not the "default" color, since presumably those with text contrast issues would enable said feature and thus it'd become a non-problem.
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
I think BugBot misclassified this one - it feels like it properly belongs in the DevTools::Accessibility Tools component. Emilio, would you be able to check and move?
Updated•11 months ago
|
Comment 3•11 months ago
|
||
I agree, thanks!
Updated•6 months ago
|
Description
•