-
Notifications
You must be signed in to change notification settings - Fork 9
Create a 'high-contrast' media feature within CSS media queries #1
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
Comments
See also APA ACTION-728. |
Fundamentally, I'd welcome a simple standardised My concern though is that on many platforms, high contrast, once enabled, acts on quite a low level and simply inverts all visible pixels on the display. In these cases, if there was a |
for reference, some interesting discussion happening on w3c/csswg-drafts#1286 about the usefulness/complexity of having a simple true/false media feature. |
Relevant: for knowing that the user wants high-contrast (but the UA hasnt' done anything forcibly), @frivoal and I are currently leaning toward just using the 'light-level' MQ (see issue 3 in that section). While superficially about light levels, "dim" doubles as a "prefer light on dark" setting, while "washed" doubles as a standard "prefer high-contrast dark on light" setting. Merging these together has the distinct benefit that authors designing for one end up accidentally handling the other case as well (that is, anyone trying to handle light levels gets a11y benefits for free, and vice versa). As far as we can tell, this appears to be a close-enough correspondence to justify not adding a special-purpose 'prefers-*' MQ just for contrast preferences. Separately, the 'inverted-colors' MQ tells you that the UA has inverted the colors, allowing you to react to that. The relationship of this with "UA has imposed some high-contrast light-on-dark or dark-on-light adjustments" is unclear. |
(Largely copying my comment on w3c/csswg-drafts#1286 over here): I wonder if "high contrast" would be better as the primary concept, with light levels mapped onto the various high contrast preferences (dim -> light-on-dark, washed -> dark-on-light)? I think that would better match the way people would tend to think about these options. |
agree with @alice here |
I'm not necessarily against defining an alias of 'light-level' named |
I think it would be good to ask accessibility experts who actually know about the various conditions that lead people to prefer high or low contrast, with light on dark or vice versa, to see how good the match is. |
Yeah, def, but just pointing out that you and I have had this discussion before, and there's a significant benefit to making things "just work" rather than creating a11y things that are nearly the same as other features but very slightly different; most of the time that just means people will only use one or the other. |
Oh yes, absolutely. So I'm totally for light-level doubling up as an a11y, as that will increase its usage and its benefits. But if we're going to give it two names, it seems better to check if they actually mean the same, or only partly. |
my concern would be authors using light level for whatever form of custom styling (e.g. really popping vibrant colours when light levels are low, because they look best when the display is cranked up super bright to compensate, and a completely different visual appearance when light levels are high; or adding moons and stars when it's low light and a bright smiling sun and cloud picture when it's light; ...or any other things that authors can and will do based on different values) ... and all those would have nothing to do with actually heeding to the user's desire/need for higher or lower contrast. you'd get the accessibility benefit mostly as a coincidence, and sometimes you won't. |
Argh, forked conversation. Copying w3c/csswg-drafts#1286 (comment) over here:
[1] @frivoal added in w3c/csswg-drafts#1286 (comment):
|
@patrickhlauke Yes, that's a concern, but contrast (npi) that against the possibility that an author reaches for |
or do them separate, but suggest that UAs add settings that tie them up behind the scenes if enabled (by default)? |
Not sure what the difference is between that and what I suggested? |
i'm saying we possibly should have separate media features (for |
Addressed in Media Query Level 5 (WD) for detecting user preferences. |
This issue was originally raised in the APA tracker as ISSUE-500. Migrating to CSS A11Y.
The text was updated successfully, but these errors were encountered: