Problem/Motivation
Focus styles should only apply when they are really necessary, e.g. when navigating with the keyboard. See this explanation on MDN:
Browsers no longer visibly indicate focus (such as by drawing a "focus ring"), around each element when it has focus. Instead, they use a variety of heuristics to provide focus indicators only when it would be most helpful to the user. For instance, when a button is clicked using a pointing device, the focus is generally not visually indicated, but when a text box needing user input has focus, focus is indicated.
Proposed resolution
Use the :focus-visible pseudo-selector, instead of :focus.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3427070-focus_visible-2.0.x-3.patch | 22.93 KB | mrshowerman |
Issue fork openculturas-3427070
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mrshowermanOpened MR against 2.1.x, adding patch for 2.0.x.
Comment #4
hexabinaerI am reluctant. Admittedly this is the more modern approach and surely makes it nicer for sighted users. Have you checked back with different input devices in all instances?
Comment #5
mrshowermanNot myself. But this is also how it is done in the Bootstrap framework (e.g., buttons), and accessibility plays an important role there.
Comment #6
mrshowerman