-
Notifications
You must be signed in to change notification settings - Fork 257
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
Note 4 in definition "contrast ratio" still relevant (1.4.3, 1.4.6, 1.4.11)? #876
Comments
Hi @JAWS-test we do have F24: Failure of Success Criterion 1.4.3, 1.4.6 and 1.4.8 due to specifying foreground colors without specifying background colors or vice versa. |
@JAWS-test we won't change this for 2.2 but have marked this with the "WCAG.next" label so we can have this on the radar for the future/silver. |
I know F24 very well and always use it to explain what note 4 actually means.
That's why I wanted to start a discussion if note 4 and all related failures and techniques are still needed.
That was clear to me, so it was a suggestion for WCAG 3.0, as I wrote. |
I don't want to leave unmentioned that with a bookmarklet G148 works in any browser - only I hardly believe that except for testing purposes someone uses it. |
Yes it is still very relevant, and in fact is in the TITLE of technique G148: > Not specifying background color, not specifying text color, and not using technology features that change those defaults
Not true. You need to read the TECHNIQUES that go along with the SC, and G156 addresses this directly.
This is not true. Colors can be set in all the major desktop browsers, including but not limited to Edge (replaced IE), Safari, Firefox, and yes even Opera and Chrome. Edge and Safari can directly load custom user style sheets in the UI, Firefox allows access to the defaults as described here.. Chrome (and Firefox) are theme-able, Chrome and Opera have extensions that allow custom sheets, custom colors, inverting polarity, contrast and even daltonization (recolor for CVD). But "user style sheets" are mostly worthless, as a poor "one size fits all" approach that usually ends up breaking sites, and NOT really addressing functional needs while throwing away all the design of the author. What Chrome, iOS, etc etc are doing instead is ADDRESSING FUNCTIONAL NEEDS, by allowing users to make relative adjustments of font size, zoom level, contrast, polarity, etc. which is ultimately more useful than a style sheet that throws out the entire page design. RELATIVE adjustments are useful. Overriding the author in total is not nearly as useful. User style sheets also have potential security issues. The major modern desktop browsers, and the modern mobile devices all have accessibility controls which directly assist functional needs for these purposes. By modern I mean the last 8-10 years. BUT, these controls can be made worthless if authors create non conforming content.
It is not relevant if some use cases prevent the problem, the fact is that not all use cases prevent the problem. But user styles and high contrast mode are by far not the only accessibility controls ona modern device. Switching to some modes can definitely make a problem worse when a FONT color is defined but the background is not defined. That is the entire point of the technique - if you define BG or Text, you MUST define the other, because you will not know definitively what the user agent is using.
The note is very clear in english. Citing also my response to you in that other thread, perhaps this underlines the importance of translations. There are some translations here: https://www.w3.org/WAI/standards-guidelines/wcag/translations/
That's weird because it is quite clear in Techniques G148. As for pages not violating it: that would be an expected result. Defining a BG color but not font or vice-versa is a pretty big design mistake. The fact that few sites make this mistake does not therefore mean it is not needed in the standard!
It is not hidden in understanding, it is listed in techniques G148. |
Hi Andrew @awkawk — for Silver this probably fits as part of the "customization paradigm," though I don't see a real change as it refers to a mandate to define adjacent colors, or if one is undefined, all should be undefined so all use only the user agent. I can't imagine many cases where you'd want to leave some, but not all, colors undefined. Perhaps the understanding doc should indicate that user agents may vary in default colors, so all color should be defined as a best practice. I see how there could be issues testing, for instance Medium.com seems to set BG with javascript, so it's not in the CSS, and Chrome does not report the BG color as set by Medium's JS from what I can tell (weird?) If an automated tester is just looking at CSS and not executing the JS, it would see that as a fail I'd think. |
@Myndex Hi Andrew, I'm afraid I don't understand your remarks at all. I have assumed that the following order applies when determining the colors in the browser (https://www.w3.org/TR/css3-cascade/#cascading-origins):
This order is valid if no For this reason, Note 4 of the definition of "contrast ratio" is not relevant for points 1-3 (in the list above). Note 4 is only relevant for the color settings in the browser (point 4) because they have the lowest priority. If only the foreground color is defined in the author's CSS (point 3) and the background color is defined in the browser (point 4): this can lead to unrecognizable content. In Chrome, I don't know any way (except for points 1 and 2, which overwrite the authors' CSS and are therefore not problematic) to change the colors that were not defined in CSS. I only know this possibility in IE and Firefox and suspect that no user uses this possibility because there are no pages that do not define colors in CSS. How can I change the colors in Chrome without Contrast plugin and without user styles? As far as I know, this is not possible: https://bugs.chromium.org/p/chromium/issues/detail?id=347016. For IE it is described here: https://support.microsoft.com/en-us/help/17456/windows-internet-explorer-ease-of-access-options?ocid=IE10_ignore_colors:
|
I'm not sure how else to explain this to you. What translator software are you using? Because something is getting lost in the mix. If the AUTHOR sets a color for a FONT, but does not set the color for the BACKGROUND, then the user agent background displays. Also the CSS cascade only applies to the items styled by CSS (including the user agent defaults). OS settings and color management settings are distinctly separate from CSS and the user agent, though I suppose windoes may have some differences — I do not support windows, so can't say.
Yes, that is what I said.
Chrome uses "themes" and you can create all sorts of custom color sheets and link them to specific sites. And Chrome has about half a dozen plug ins such as DARK MODE that work pretty well.
I told you at least twice now. I am doing it on Chrome right this second as I type this. I don't know how much easier Chrome could make it - override site CSS sheets and keep the changes persistent so your changes remain when you reload.
I really don't care about IE (last released in 2013) it was replaced by EDGE years ago... I know MS just replaced edge with their own Chrome (weird), but IE is a worthless dinosaur unless you have some clients on XP or something I guess.. Safari, Firefox, Opera all have custom options, AS DOES CHROME. The two Chrome extensions I like are Dark Mode and Color Enhancer. But Chrome works with themes and works with persistent local overrides as I have stated. |
As far as I've checked, none of the possibilities mentioned by you causes the following file to become invisible in Chrome:
Note 4 is about paragraphs 2 and 3 becoming invisible when I adjust the colors in the browser. I can do this with IE 11 and Firefox, but not with Chrome.
I'm interested in a screenshot of my file in Chrome where paragraphs 2 and 3 are not visible and a description of how this was achieved. Of course under the condition that the user styles define foreground and background color (if you use user styles). |
Regarding the background/color discussion -- there are settings in Firefox or IE to allow for overriding of page specified colors. When just that setting is on and not all colors are replaced then #2 and #3 are issues (and perhaps content that relies on currentColor). When that feature is not enabled or in browsers that don't support that feature that would not be an issue. So i'd imagine it's only an issue for certain browsers. |
As I wrote in my first comment:
But not in Chrome and Edge. The settings for IE 11 I described in #876 (comment). The Note 4 is relevant for IE 11 and Firefox - I am aware of. But my intiale question was a different one: Are there any users who use these settings of IE 11 and Firefox because these settings are mostly ineffective because the colors are defined in CSS. |
Then you haven't checked. It seems I am talking about apple trees, and you're having a conversation about tomato vines — there's a disconnect in understanding somewhere. Of course you won't make a fail when you just set the colors to standard user agent defaults that you are also already using in your browser. Nevertheless it is TRIVIAL to break, and DIRECTLY points to the need (and reason for) for the standard. Your assertion that it is not useful or needed is meritless. Here are examples in Chrome:Here with the text selected/highlighted so you can see the invisible parts:AND
Incorrect. And you are ignoring the second most used browser, Safari. Nevertheless, while still in Chrome, here is a user override of ALL colors, without changing the last example page itself in anyway, only adjusting the local user overrides.
The examples are above.
No. This is now the third time I have explained this to you, and this time with examples all done in Chrome. If you still don't get it, there's a nifty site I heard of called Google.com and if you go there you can do a search and find all sorts of useful answers to questions like this. It's easy and free! Seriously, there are a million tutorials on this, and I am obviously incapable of communicating with you. Best of luck to you. |
If Note 4 should continue to exist, I suggest adding the following:
|
I don't understand why this is a problem. The note says that if the author only specifies one of foreground/background then it's a problem. 1.4.8. asks the author to provide a mechanism for the user to select foreground/background colors, of which G148 is one mechanism.
Not the case, Chrome has a pluggin which (last time I tried) is auto-suggested to you if it detects HCM.
Or a pluggin like Stylish (which has millions of users, some with LV needs) which over-rides the CSS on a more granular basis. However, that doesn't impact Note 4.
There is a graduation - if you don't specify one of the colors (whilst specifying the other), that's a fail. However, if you don't specify the background, here is a basis of measuring the assumed contrast, so that if you do set the background color (to white) then you know whether the text would have enough contrast in that scenario. I see what you mean about those being confusing taken together, but they are relevant to slightly different scenarios.
I'd be interested to know how many people (and how many different organizations) that was. |
@alastc The chrome extension does not allow users to choose colors or replace the background or foreground with a specific value. The extension is not effective for real uses. |
Hi @mraccess77 Hi Jonathan, There is a free Chrome plug-in that is everything you want and what whole lot more. It's called Dark Reader. I came across it recently when I was researching available modification technologies. Here are a few screenshots. DARK READERThe webpage on the left in it's normal and unaltered mode: DYNAMIC MODEIt has a dynamic mode which allows you to invert the text content without inverting images. Note als. They've inverted contrast but they kept the colors the relative colors of the web design and the images the same. One of the things I hate the most about a lot of the inverted modes in OSs and other extensions is that they also invert the hue which is getting even farther away from the authors original intent. RELATIVE CONTROLAlong with inverting or if you want instead of converting you have very fine control over the overall brightness and contrast and it makes changes relative to the content authors original intent as opposed to overwriting them. GLARE REDUCTIONOne of the interesting modes, is sepia mode which reduces blue, which is huge for people who have a problem with glare and chromatic aberration. SPATIAL FREQUENCYAnother much-needed incremental feature, is the ability to change the stroke width a font. Much of my recent research shows that it is stroke width more than anything else that affects perception of contrast. PER SITE STYLE SHEETSAnd what I'm more incredible features is not only can you edit stylesheets independently in per site, have a library of user shared CSS sheets for different sites that'll allow more customization using dynamic mode. I have no connection to this plug in whatsoever, but it is very much addressing the kinds of user relative changes but I've been talking about in some other threads. Andy |
That's not a problem. I only wanted to ask if Note 4 is obsolete, because Note 4 is only relevant under the following conditions:
It would be clearer if a note were made directly in the "Intent" chapter. This explains, for example, that the contrast requirements also apply to hover and focus states. |
By the way, note 3 only makes sense if it is supplemented as follows: " If no foreground color is specified, then black is assumed" Because white and black are the standard colors of the operating system for background and foreground. If I only specify the one standard color in Note 3, what should be measured remains open if neither foreground nor background color are defined. Understanding 1.4.3: Here a reference to 1.4.11 would be good |
Hi Andrew / @Myndex , just FYI sadly Dark Reader doesn't work well with web components. Our applications are not or badly changed / adjusted. |
Interesting @jake-abma, I wonder if it's just a new-ness thing (needs work in the extension), or a fundamental way that CSS is applied to web components? Do other methods of applying user-styles work on web components? |
@alastc It all depends on the author, the whole thing with web components is that you have global CSS and local CSS where you can isolate styles, use Shadow DOM for style encapsulation. |
Hi @jake-abma do you have a URL of an example? |
@alastc Can the notes in the glossary be changed or do they belong to the unchangeable part of the WCAG 2.x? |
HI @Myndex I tried the extension but it doesn't really give me the granularity for colors that I want. It makes contrast better but changes the color combinations to ones that I don't prefer in some areas but ones that are pleasant in others. These filter approaches tend to be like that. |
Hi @mraccess77 hi Jonathan, Yes there certainly is not a perfect solution yet, but this is the closest I've found so far. Did you try dynamic mode and the CSS customization features under developer tools? |
@Myndex @alastc Our application is behind a login, tried to check the Polymer-project but the new site doesn't use web components anymore... :-) I see some old pages from polymer still have them, check out https://polymer-library.polymer-project.org/3.0/api/elements/dom-if as an example, the main context / text... |
Hi @jake-abma Works fine for me. Dynamic mode does have an issue with some text that inherits properties from #shadow-root, I think can be adjusted but might be a bug that needs reporting. Here are examples nevertheless that I did without editing any CSS at all. I made poor font and color choices intentionally to make the change obvious. Dynamic and Light mode:Filter+ and Dark ModeReasons a site may not work pasted from the docs:
|
hi @mraccess77 Hi Jonathan, Here's a link showing how to be very granular: |
Note 6 in contrast ratio
contradicts note 4 in my opinion, because the problem described in note 4 only occurs if the user excludes the colors in the user agent. It is possible that note 6 should be amended to refer only to changes made to the user agent that were not made by the user. |
Hi Andrew, indeed it works fine, no idea why but I surely had issues first time I tried. Cheers! |
https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html#key-terms
I suggest to discuss and check whether note 4 under "Key terms: contrast ratio" is still relevant for 1.4.3, 1.4.6, 1.4.11 and to possibly abolish this note.
Reasons:
If note 4 should still be relevant, I suggest in WCAG 3.0 to include this directly in the SCs and not to hide it in the Understanding.
The text was updated successfully, but these errors were encountered: