Skip to content
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

Understanding Success Criterion 1.4.11: Non-text Contrast - Figure 15 #2494

Closed
giacomo-petri opened this issue May 31, 2022 · 8 comments · Fixed by #2574
Closed

Understanding Success Criterion 1.4.11: Non-text Contrast - Figure 15 #2494

giacomo-petri opened this issue May 31, 2022 · 8 comments · Fixed by #2574

Comments

@giacomo-petri
Copy link
Contributor

giacomo-petri commented May 31, 2022

Screenshot of Figure 15 with description: Figure 15 The change of background within the component is not in scope of non-text contrast. However, this would not pass Use of color

  • Expected result: This is actually not failing 1.4.1 Use of Color, because text color is changing from white to black, which is not only a change in hue, but also a change in lightness (> 3:1).
    As per 1.4.1

If content is conveyed through the use of colors that differ not only in their hue, but that also have a significant difference in lightness, then this counts as an additional visual distinction, as long as the difference in relative luminance between the colors leads to a contrast ratio of 3:1 or greater.

Keeping text to be white, we will have a contrast ratio issue, but at least it will fail the Use of color criterion and will be consistent with description below.

Giacomo

@kimviens
Copy link

kimviens commented Aug 8, 2022

Hi! I was just going to ask that question. I agree, this looks like it would pass use of color. Maybe the intention was to keep the text white? If the text was kept white, then the background change would be a use of color because its the only thing that changes.

patrickhlauke added a commit that referenced this issue Aug 8, 2022
the current image to illustrate how a simple change of background colour is not in scope of 1.4.11 non-text contrast actually muddies things, because the focused button also has a different text colour and a white halo/shadow around the text.
this example *only* changes the background colour - and, to keep it more consistent with the other examples, it uses the light blue for the non-focused buttons and the dark blue for the focused one.

Closes #2494
@patrickhlauke
Copy link
Member

made a replacement image that should be clearer #2574

@giacomo-petri
Copy link
Contributor Author

Thank you @patrickhlauke, it's perfect now.

I do still have some concerns, but maybe would be better to open a separate issue for it:
buttons font-weight apparently seems not bold and font-size seems below 18pt. Considering that equal effect can be achieved using buttons with a darker background color (ensuring a minimum contrast ratio of at least 4.5:1 between text and background) or using a font-weight:bold CSS property (ensuring a minimum contrast ratio of at least 3:1 for large text), should we be in line with 1.4.3 SC, allowing a much wider range of users to perceive and understand examples?

@patrickhlauke
Copy link
Member

fair point, was actually looking at that while hacking together that newer image. it might indeed be worth making sure the examples for 1.4.11 don't actually fail 1.4.3. I'll see if I can replicate all the "Example" button images with a more contrasty substitute... (actually tempted to see if it makes more sense to go down the SVG route for these example images, for more flexibility later on in editing them)

@patrickhlauke
Copy link
Member

@giacomo-petri expanded the PR #2574 to also at least make the text in those buttons obviously (and consistently) "large text" (they're now 21px and bold)

@Accessibility-SME
Copy link

Hello,

Need opinion on below scenario. Button already have border and just border color changes on focus. is it a pass or fail? If fails, under which success criteria?

5D3036AE-F928-4064-85D5-3065724D3892

@patrickhlauke
Copy link
Member

fails Use of Color. also, please don't use issues (that discuss clarifications/changes to the spec and related documentation) to just ask questions / get opinions like this...

@Accessibility-SME
Copy link

Thank you. Adding such scenario to page might help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants