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
Labels
type: question
The issue is a question about how code works.
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.
The text was updated successfully, but these errors were encountered: