Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

:focus styles stay around after mouse click - Implement accessibleFocus? #143

Closed
justinshreve opened this issue Jul 2, 2018 · 3 comments
Labels
type: question The issue is a question about how code works.

Comments

@justinshreve
Copy link
Collaborator

justinshreve commented Jul 2, 2018

While implementing some :focus styles per the designs, I've noticed that the styles linger after clicking with the mouse. From doing some research, it seems like this is a quirk with chrome. In some instances this is OK, but if there is an element that should have an style applied after selection (like the activity panel), the focused style will override it until you click away.

Davide pointed me to Calypo's handling of this. accessibleFocus. It applies a class that can be used for keyboard focus only.

It seems like Gutenberg has had some discussion of this in the past and has opted to not do this.

I personally think we should do something along the lines of Calypo's handling. Focus styles are important, but for mouse navigation I think the hints from hovering work. I wanted to raise this for some discussion (and get @ryelle's input) before doing anything though.

@justinshreve justinshreve added the type: question The issue is a question about how code works. label Jul 2, 2018
@belcherj
Copy link
Contributor

@justinshreve is this still and issue?

@Aljullu
Copy link
Contributor

Aljullu commented Nov 21, 2018

We could also consider the new pseudo-selector :focus-visible. Browser support is still low but there is a JS polyfill.

I have never used it, but just wanted to point out that there is a native solution before we try to implement our own.

@psealock
Copy link
Collaborator

psealock commented Jun 5, 2019

I'm going to close this one because it hasn't been a priority, but please re-open if its still important.

@psealock psealock closed this as completed Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: question The issue is a question about how code works.
Projects
None yet
Development

No branches or pull requests

4 participants