Re: 2.4.7 Focus Visible

Yep, that's what I said just a moment ago, :has() is currently the only way
to support it, but not yet fully supported.

On Thu, Jul 13, 2023 at 10:31 PM Patrick H. Lauke <redux@splintered.co.uk>
wrote:

> On 13/07/2023 20:53, Michael Livesey wrote:
> > Perhaps I didn't phrase correctly.
> >
> > Applying an outline around the actual checkbox is awful UX, who does
> that?
> >
> > In order to apply good UX we need to use the onfocus event. This event
> > cannot return user agent heuristics for focus-visibility setting.
>
> <label><input type="checkbox"> ...</label>
>
> label:has(input:focus-visible) { /* style me */ }
>
> (support for :has() is still behind a feature flag in Firefox at the
> moment)
>
> https://codepen.io/patrickhlauke/pen/qBQxXvy
>
> 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, 13 July 2023 21:53:18 UTC