-
Notifications
You must be signed in to change notification settings - Fork 233
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
Should C40 be also sufficient for 1.4.11 Non-Text Contrast? #2575
Comments
in theory, you can pass 2.4.7 Focus Visible by having a single pixel that changes by a single HEX value (because WCAG 2.0 / 2.1 don't normatively define what "visible" means) - see https://youtu.be/I0tghv881ac?t=1468 (or the less humourous, but slightly cleaner, version at https://youtu.be/n-eM7_eYuCs?t=1688) so no, as long as there's at least one single pixel that visually changed, it can be argued that focus is "visible". and this is the original reason why we then tried to patch this loophole with 1.4.11, and now in upcoming WCAG 2.2 "third time's the charm, maybe" with 2.4.11 Focus Appearance |
yes, though i see nobody's updated it accordingly... |
From C40: Creating a two-color focus indicator to ensure sufficient contrast with all components
On focus:
Focus indicator is 2 colors, a light color and a dark color, but the combination of background colors used do not ensure focus visibility. We should add some word to exclude this scenario. |
Or maybe that's why 1.4.11 SC has not been included, because it doesn't necessary satisfy it... 😄 |
According to current WCAG 2.2 draft, it's passing 2.4.11 too (https://w3c.github.io/wcag/understanding/focus-appearance-minimum.html) |
not sure i follow your reasoning here. if you have a two-tone focus indicator, either the light or the dark part of the indication should have sufficient contrast against whatever background colour you put behind it (unless you find a specific shade that results in < 3:1 contrast both against white and against black).
also, focus visibility has nothing to do with contrast ratio. which is why 1.4.11 was brought in. |
Thank you both for the super quick replies! I will add the note about the possibility of failing 1.4.11 but passing 2.4.7, this will be important in my testing. For C40, I see that indeed yes it should be sufficient for 1.4.11. |
Please, look at the example n.2 (White outline and black internal box-shadow (not visible at all)) in the attached focus-example.zip html file.
You are right. |
Haha! You found a rare edge case! Maybe there can be specificities that could be added like "the outside colour must contrast with the background"? |
ah indeed, not even a single pixel changes here, so that fails 2.4.7. all other cases pass 2.4.7 also worth noting that even sufficient techniques don't necessarily always pass/cover every possible permutation. they're mostly non-exhaustive examples. don't think this needs any specific extra call-out when you can apply common-sense to ascertain that no, in this case there clearly is no visible focus indication |
Of course in this example I've exaggerate the behaviour, but in general, reading the C40 sufficient technique, I would think that this solution is enough safe to say that, regardless the combination of colors I'm using on my website, the use of focus indicators that include both dark and light outlines ensure 2.4.7 SC (and 2.4.11 SC) to pass.
This is even more relevant in 2.4.11 (WCAG 2.2).
and it doesn't fall under the exception due to
but according to C40 (listed as sufficient technique), it should pass. That's why I think we should add some language to avoid discrepancies between guidelines/understanding and sufficient techniques. |
+1
Gregg Vanderheiden
***@***.***
… On Aug 9, 2022, at 9:20 AM, kviens ***@***.***> wrote:
Haha! You found a rare edge case! Maybe there can be specificities that could be added like "the outside colour must contrast with the background"?
—
Reply to this email directly, view it on GitHub <#2575 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACNGDXTEPDADI4SCRJTNHDTVYKAN3ANCNFSM56A6ZPGQ>.
You are receiving this because you are subscribed to this thread.
|
I've included notes in #3112 's rewrite of C40 which should help clarify the conditions where the two-color indicator might not meet the requirements and hopefully address this concern. |
Update approved: https://www.w3.org/2023/05/09-ag-minutes.html#t05 |
Hi everyone!
The reason why I ask if C40: Creating a two-color focus indicator to ensure sufficient contrast with all components is because I am trying to determine if a focus indicator that fails the contrast requirement fails both 1.4.11 and 2.4.7.
Let's say we have the situation like in figure 12 of 1.4.11. See below:
![Screenshot of figure 12 where the focus fails non-text contrast inside of a button](https://user-images.githubusercontent.com/56558696/183670714-419cc766-2e8b-4a45-8d19-134ac81c4c58.png)
In the image there is a focus but it fails non-text contrast. Therefore, would it be a failure of 1.4.11 Non-text Contrast and a pass of 2.4.7 Focus visible because the focus is there? Would it fail both because we can pretend that any non-text element that fails the contrast requirement is "invisible" to the user.
That said, the sufficient technique C40 is about ensuring proper contrast. Considering how 1.4.11 Non-text Contrast speaks about focus indicators, C40 sounds like it would also fix non-text contrast requirements.
Restatement of the questions:
The text was updated successfully, but these errors were encountered: