Wcag: Does the Understanding Doc for 1.4.11: Non-text Contrast (try to) exempt authors from conforming to 2.4.7 Focus Visible when relying on default UA focus styles?

Created on 4 Sep 2020  ยท  6Comments  ยท  Source: w3c/wcag

In the Understanding for 1.4.11: Non-text Contrast, one of the examples says:

Default focus style
Links are required to have a focus indicator byย 2.4.7 Focus Visible. Where the focus style of the user-agent is not adjusted on interactive controls (such as links, form fields or buttons), the default focus style is sufficient.

1.4.11 has an exemption of contrast for unmodified user agent, but 2.4.7 has not.

While that (to my understanding) means that that there is no 1.4.11 3:1 contrast requirement, it seems still insufficient to have an invisible/imperceivable focus style even when relying on the UA style. So if the color of the focus outline of the UA is black it would not conform on a black background as it is not visible.

It feels that the non-normative claim โ€œWhere the focus style of the user-agent is not adjusted on interactive controls (such as links, form fields or buttons), the default focus style is sufficient.โ€ is not substantiated by the actual normative text of 2.4.7.

This section in the understanding should be reflected to address this, alternatively an exception should be added to 2.4.7.

(See also this discussion on Twitter: https://twitter.com/stommepoes/status/1301813234585014274)

1.4.11 Non-text contrast 2.4.7 Focus Visible WCAG 2.1

Most helpful comment

Would agree with you @patrickhlauke

Just came across an instance of ... interesting CSS/HTML choices... where a link that was white retained its default dark focus outline in Firefox. This focus indicator, set against a dark background, was indistinguishable. And falling back on the "but it is the default focus indicator" serves no one but the author not wanting to update their style sheet.

All 6 comments

2.4.7 requires a visible focus indicator, even if only the standard focus of the browser is used (see https://www.w3.org/WAI/WCAG21/Techniques/failures/F78).
2.4.7 does not require a minimum contrast, however.

1.4.11 requires a minimum contrast, but only for focus indicators that are not from the browser.

This is indeed somewhat confusing, but in itself not a contradiction, because it means that a browser focus must be visible, but not necessarily meet the 3:1 contrast.

I'm not sure if anything needs to be adjusted here. Soon WCAG 2.2 will be released and with that there will be 2 new SCs for focus which will clarify the problem.

The main issue, again, here is that it says

Links are required to have a focus indicator by 2.4.7 Focus Visible. Where the focus style of the user-agent is not adjusted on interactive controls (such as links, form fields or buttons), the default focus style is sufficient.

The sentences in conjunction indicate that they need to have a focus indicator but, if I is the UA default, that UA default is sufficient.

One way to clarify that is:

Links are required to have a visible focus indicator by 2.4.7 Focus Visible. Where the focus style of the user-agent is not adjusted on interactive controls (such as links, form fields or buttons) by the website (author), the default focus style is exempt from contrast requirements (but must still be visible).

(And I agree with your interpretation, but the Understanding documents need to be clearer.)

Yeah, this:

even if only the standard focus of the browser is used

causes trouble when the browser's focus is invisible or nearly so.

Basically, Firefox renders invisible focus rings quite regularly due to its focus ring colour being derived, in their own stylesheet, from the text colour of the focusable element. This often results in a white-on-white (as most web pages have a white background).

Eric's edit suggestions above clear this up (with exception to Pat's "visible isn't defined" bit, where he often argues this allows a single visible pixel to be sufficient. 2.2 will deal with this though).

@yatil I agree that your proposal formulates this much better and am in favor of making an appropriate adjustment until WCAG 2.2 is released. After that the passage should be adapted anyway and refer to the two new SCs

this also hinges on the interpretation, normatively, "where the appearance of the component is determined by the user agent and not modified by the author". it's not quite correct to say that this just means "the author hasn't changed the focus indicator", but rather - as the subject is the component itself, not the indicator, "the author hasn't changed the look/feel of the component" in any way that would impact how the focus indicator is shown.

as i've argued before, this can even mean any changes (like the parent container's background, or even body/html background, or the component's foreground text color, or border, or...pretty much any styling) can invalidate that exception. in my view anyway.

Would agree with you @patrickhlauke

Just came across an instance of ... interesting CSS/HTML choices... where a link that was white retained its default dark focus outline in Firefox. This focus indicator, set against a dark background, was indistinguishable. And falling back on the "but it is the default focus indicator" serves no one but the author not wanting to update their style sheet.

Was this page helpful?
0 / 5 - 0 ratings