Re: 2.4.7 Focus Visible

I think Patrick you have just demonstrated why the wording in 2.4.7 needs
to change.

I agree, an easy to see toggle in browsers for heuristics settings for
focus-visible would be good.

However, that is NOT what 2.4.7 specifies. 2.4.7 specifies that ONLY
keyboard control should show a visible focus. As a result of the wording of
2.4.7, I already know of developers adding event listeners to catch global
events which prevent the focus visibility on everything except keyboard
events and claiming AA WCAG standards.

However, that is not what focus-visible specifies, focus-visible, as you
state, is supposed to enable user agent control of focus visibility.
Furthermore, even as a default, any text containing element that is
editable is supposed to receive visible focus even from a mouse click.

As a result of the 2.4.7 wording we have developers who are nobbling
focus-visible for everything except keyboard tab, and furthermore
preventing user agent control. Therefore, if we you are arguing for
focus-visible as the gold standard, the wording of 2.4.7 should be changed
to "focus must be visible on all controls according to the specification of
focus-visible implemented by the browser or modified by the user agent"
which is actually the below 5 rules for most browsers currently.

1) If the user agent has specified that focus-visible should show the focus
ring (click or keyboard), the focus ring should always show
2) If the control has the potential for keyboard input - e.g.
textarea/input etc, clicks and keyboard will trigger a visible focus ring
3) If the control does not have the potential for keyboard input - e.g. a
link or a button, OR it is a custom control, ONLY non-pointing devices
(this does not just mean keyboard, it also includes all non-pointer
assistive devives) will trigger focus-visible.
4) If scripting causes focus to move from a previously focus-visible item,
then the newly focused item will also be focus-visible
5) If scripting causes focus to move from a previously not focus-visible
item, then the newly focused item will also be not focus-visible

On Tue, Jul 11, 2023 at 1:24 AM Patrick H. Lauke <redux@splintered.co.uk>
wrote:

> On 11/07/2023 01:12, Patrick H. Lauke wrote:
>
> > Not as laborious as trying to convince every website on the web to make
> > certain changes, or to drop certain approaches, which is something that
> > even just for the humble CSS outline failed for decades (noting that the
> > :focus-visible approach itself was spec'd exactly with the intention of
> > providing a way to be more adaptive/reactive to user needs - now we need
> > a way for users to more directly express their needs in the browser
> > itself - this is similar to parallel discussions about media queries and
> > how users should be able to express their preferences for these in
> > browser settings).
>
> Also, just on the topic of Firefox, the setting that shows
> :focus-visible even after a mouse/pointer interaction can be accessed
> already even today, by going to the dark corners of about:config and
> setting browser.display.show_focus_rings to true. The missing piece now
> is a nice checkbox in about:preferences and then we have the best of
> both worlds: users that want/need focus indication at all times can then
> easily enable this feature, those who don't want/need it can turn the
> setting off (but still get the focus indication regardless if they
> navigate via keyboard, where it makes sense to always have it visible).
>
> P
> --
> Patrick H. Lauke
>
> https://www.splintered.co.uk/ | https://github.com/patrickhlauke
> https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
> https://mastodon.social/@patrick_h_lauke | skype: patrick_h_lauke
>
>

Received on Tuesday, 11 July 2023 14:56:12 UTC