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

2.4.7 / 1.4.11 Conflict between 1.4.11 Understanding text and G195 (author-supplied focus indicator) #3682

Open
detlevhfischer opened this issue Feb 9, 2024 · 7 comments · May be fixed by #3686

Comments

@detlevhfischer
Copy link
Contributor

detlevhfischer commented Feb 9, 2024

Under "Relationship with 2.4.7 Focus visible", the Understanding text of 1.4.11 says that

the visual focus indicator for a component must have sufficient contrast against the adjacent background when the component is focused, except where the appearance of the component is determined by the user agent and not modified by the author.

...and "sufficient contrast" means 3:1. There is no reference to the thickness of the indiactor.

However, the test procedure of Sufficient Technique G195: Using an author-supplied, visible focus indicator. has this as a last step:

  1. If the focus indicator does not have 3:1 contrast ratio with its adjacent colors, check that it is at least 2px thick.

So that creates uncertainty whether the quite frequent cases of buttons having an outside focus ring several pixels thick but below 3:1 would conform. This is an example:
button-focus^

The light green thick focus ring has a contrast of 1.9:1 to the light grey background. Figure 9 of the 1.4.11 Understanding text seems to support the view that a focus ring with insufficient contrast to the background would not pass. If this is consensus, the test procedure of G195 needs to be revised to take out the last point. I am happy to create a PR for that.

@patrickhlauke
Copy link
Member

If the focus indicator does not have 3:1 contrast ratio with its adjacent colors, check that it is at least 2px thick.

I'm struggling to work out why that step is even there? I mean sure, for 2.4.7 Focus Visible, in theory a single faint pixel "passes". But if the technique is meant to apply also to 1.4.11 Non-Text Contrast, there is no "escape clause" built into 1.4.11 about size trumping contrast. Is this something that may have come out of early Focus Appearance stuff?

@patrickhlauke
Copy link
Member

the test procedure of G159 needs to be revised

absolutely in favour of that. nuke that last point, i'd say

@detlevhfischer detlevhfischer changed the title 2.4.7 / 1.4.11 Conflict between 1.4 .11 Understanding text and G159 (author-supplied focus indicator) 2.4.7 / 1.4.11 Conflict between 1.4.11 Understanding text and G195 (author-supplied focus indicator) Feb 9, 2024
@mraccess77
Copy link

If the focus indicator does not have 3:1 contrast ratio with its adjacent colors, check that it is at least 2px thick.

I'm struggling to work out why that step is even there? I mean sure, for 2.4.7 Focus Visible, in theory a single faint pixel "passes". But if the technique is meant to apply also to 1.4.11 Non-Text Contrast, there is no "escape clause" built into 1.4.11 about size trumping contrast. Is this something that may have come out of early Focus Appearance stuff?

Seems like that came from previous versions of focus appearance which is now AAA and has changed.

@patrickhlauke
Copy link
Member

patrickhlauke commented Feb 9, 2024

as G195 doesn't even reference Focus Appearance, that's then irrelevant either way (and yes, with a contrast below 3:1, it would then not be sufficient for 1.4.11 which the technique is supposed to be)

@mbgower
Copy link
Contributor

mbgower commented Nov 20, 2024

@patrickhlauke The WCAG 2.2 version of G195 does indicate it is sufficient for Focus Appearance.

The 2.1 version does not.

So it seems we have two different issues. I agree that for the 2.1 version, the third line should be removed. I also think others do as well, unless we are aiming to exceed the requirements of Non-text Contrast.
But if the 2.2 version is to continue to point to 2.4.13, there are other changes needed in the test to meet the AAA requirement.

@patrickhlauke
Copy link
Member

Thanks for spotting the difference between the 2.1 and 2.2 versions of this technique. It definitely seems that for 2.1 at least, this technique is built to exceed what is normatively required - points 2., 3., specifically go beyond anything required by 1.4.11 and 2.4.7.

But yes, point 5. is wrong both for 2.1 and 2.2.

@mbgower
Copy link
Contributor

mbgower commented Nov 21, 2024

If this is applies to 2.4.13 in 2.2, check 5 could be

The focus indicator is at least 2px thick.

(or "Check that the focus indicator..." if we want to preserve the slightly cumbersome language of the current technique)

That would allow it to meet:

is at least as large as the area of a 2 CSS pixel thick perimeter of the unfocused component or sub-component, and

But more than just check 5 would need to be updated!

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

Successfully merging a pull request may close this issue.

5 participants