[csswg-drafts] [css-ui] Consider ignoring :focus{outline} properties when the user is navigating with the keyboard (#7321)

jyasskin has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-ui] Consider ignoring :focus{outline} properties when the user is navigating with the keyboard ==
This is an idea from https://github.com/WICG/interventions/issues/69 in 2019 that hasn't been acted on and might be a bad idea, but I didn't want it to just get lost. A search for "[outline accessibility](https://www.google.com/search?q=outline+accessibility)" reveals a long history of accessibility advocates trying to convince web developers not to remove [outlines](https://drafts.csswg.org/css-ui/#outline) from focused elements. Since people keep having to write this advice, it doesn't seem to be super effective. Instead, browsers could ignore CSS rules that remove the focus outline when the user is known to navigate using the keyboard.

I haven't done the legwork to figure out what intervention would be web-compatible or to figure out exactly how to identify a keyboard user, although use of `tab` to change focus and the browser generating the accessibility tree could be good indications.

[`:focus-visible`](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo) is related and might indicate that a site explicitly wants to override this sort of intervention.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7321 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 27 May 2022 03:50:01 UTC