This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Focus indicators across the app are not well-styled #44878
Open
Description
With adding keyboard shortcuts #19021, indicating the current focus across the app in a consistent manner becomes more important.
Currently, that focus indicator is very inconsistent and often not well-designed:
- Sometimes it's transparent, sometimes a deep blue (sometimes double)
- Sometimes it doesn't wrap around what visually looks like the interactive element because there are bad invisible paddings
- Sometimes the hover or pressed state is conflated with focus state
- Sometimes the focus indicator is cut off
- Sometimes they have a gap between the element and the outline, sometimes they don't
- Sometimes there is no padding between the text and the outline, making the text hard to read when focused or a button not appear symmetrical when focused
Examples:
- Search results have small gap above focus box
Implementation notes:
- We should look into using
outline
again instead ofbox-shadow
, browser support for moreoutline
styling options has improved a lot. padding
andmargin
need to be used carefully & intentionally. Even if they look visually the same, the focus outline is outside thepadding
and inside themargin
.- We obviously can't design a focus outline for every single instance of an interactive element in the app, we need a global style that work well in almost all cases, potentially with rare overrides in Wildcard components.
/cc @felixfbecker