Re: Clarifying WCAG 2.4.7 Focus Visible

For context, adding a summary of the answer I gave on a11yslackers...

tl;dr: just use :focus-visible

noting that 2.4.7 talks about there being a "mode of operation" where 
the focus is visible. under this aspect, it's fine to say that focus is 
only visible when using keyboard/keyboard-like input

of course, if you can have a very prominent visible focus indication at 
all times, regardless of whether activated/achieved by mouse/touch/etc 
or keyboard, then go for it. from a compliance with WCAG point of view 
though, it's fine using :focus-visible for instance

  if it's an immediate-action type control, i'd say it's good not to 
have visible focus indication as result of mouse/touch activation. for 
form fields etc, you'd likely want to have focus indication regardless. 
i.e. what :focus-visible does

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 Thursday, 1 June 2023 18:52:29 UTC