Skip to content
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
@felixfbecker

Description

@felixfbecker

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

image

  • Deep blue focus outline or double
    image image image image
    image image
    image image
    image image
    image image
    image image

  • Cut-off outlines
    image image
    image image

  • Same style for hover as for focus (transparency instead of outline)
    image

Implementation notes:

  • We should look into using outline again instead of box-shadow, browser support for more outline styling options has improved a lot.
  • padding and margin need to be used carefully & intentionally. Even if they look visually the same, the focus outline is outside the padding and inside the margin.
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions