Skip to content

[P3][a11y] Keyboard focus relies entirely on the browser default ring; the app defines none #707

Closed

Description

@EVWorth

Tabbing through the app produces a visible focus ring, but it is the user
agent's, not the app's:

outline: auto 1px rgb(139, 139, 160)

The app defines no :focus-visible styling of its own anywhere. (The
outline: none rules present in the page all come from Monaco's stylesheet,
not from this codebase — those are not the problem.)

Why this is worth owning rather than inheriting

  • 1px at low contrast is weak on the dark surfaces this app defaults to,
    and it is the same ring on a 21×26 icon button as on a full-width list row.
  • It is not consistent across platforms. The packaged app runs on
    WebKitGTK on Linux, WKWebView on macOS and WebView2 on Windows — three
    different default rings. §1.3 principle 5 commits to "Cross-Platform
    Parity", and focus appearance is currently whatever three engines each
    decided.
  • §1.3 principle 3 makes keyboard use a headline promise. The indicator that
    tells a keyboard user where they are is worth designing rather than
    inheriting.

Unverified: I measured in Chromium via just dev-web. I have not
confirmed what WebKitGTK renders in the packaged Linux build, and it may be
worse — or absent on some control types.

Fix

A single token-driven ring in globals.css:

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: inherit;
}

:where() keeps specificity at zero so components can still override, and
2px + offset stays visible against both themes' surfaces.

Worth pairing with #701 — a keyboard user who can now reach a dialog also
needs to see where they are inside it.

Found during the UI review.

Activity

  1. added
    audit
    severity/p3
    kind/a11y
    area/theming
    on Sep 17, 2026
  2. EVWorth commented on Sep 17, 2026

    @EVWorth
    OwnerAuthor

    Landed in #708 (merged as 6fa7abc), which is in main.

    :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
      outline: 2px solid var(--color-accent);
      outline-offset: 2px;
      border-radius: inherit;
    }

    :where() keeps specificity at zero so a component can still override it, and the ring is token-driven so it works on both grounds.

    The caveat in the issue still stands and is worth repeating: this was measured in Chromium. What WebKitGTK, WKWebView and WebView2 render for the packaged builds is unconfirmed — but now that the app draws the ring itself rather than inheriting three different defaults, the cross-platform parity concern is mostly answered by construction.

    Stayed open because #708's "Closes #700, #704, #707" only closed the first — GitHub needs the keyword repeated per issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/themingauditkind/a11yseverity/p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions