Skip to content

fix(site/src): raise focus indicator contrast to 3:1 - #31567

Merged
aqandrew merged 1 commit into
mainfrom
fix-focus-indicator-contrast
Oct 31, 2026
Merged

aqandrew merged 1 commit into
mainfrom
fix-focus-indicator-contrast

Conversation

@chrifro

@chrifro chrifro commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the axe Auditor findings "Focus indicator lacks 3 to 1 contrast ratio" (WCAG 1.4.11).

Closes DEQ-567
Closes DEQ-215
Closes DEQ-150
Closes DEQ-294
Closes DEQ-36
Closes DEQ-43
Closes DEQ-54
Closes DEQ-318
Closes DEQ-141
Refs DEQ-88

Issue What this PR fixes Already fixed on main
DEQ-567, DEQ-215, DEQ-150 Workspaces and Templates table rows
DEQ-294 Theme mode select options
DEQ-36 HTTP/HTTPS port protocol select options Workspace, download, and logs menu items (#30354)
DEQ-43 Sharing role select options Search combobox and Remove menu item (#30354)
DEQ-54 Base template cards and summary buttons
DEQ-318 Template builder summary buttons
DEQ-141 "Go to Modules" summary button Module cards (#30540)
DEQ-88 (partial) Login type select options Organization combobox (#30354). The selected-option check icon color is not addressed.

DEQ-449 and DEQ-63 need no change here: their menu and combobox items were already fixed on main by #30354.

  • Clickable table rows (Table, useClickableTableRow; Workspaces and Templates lists): keyboard focus used the 1px border-secondary hover outline. It is now a 2px inset content-link outline. The hover outline is unchanged.
  • Select items (SelectItem, plus the custom login-type item in CreateUserForm; theme picker, HTTP/HTTPS port protocol, sharing role selects): focus only changed the background (#18181B on #09090B). They now get the same 2px inset content-link ring that menu and command items already use.
  • Template builder cards and summary buttons (TemplateCard, SelectionSummary): they used ring-border-primary, which is not a defined token, so no ring color was applied. They now use ring-content-link.

Measured contrast of the focus indicator against the adjacent color:

Element Before (dark / light) After (dark / light)
Table row 1.91 / 2.56 7.90 / 5.17
Select option 1.12 (background only) 7.04 / 4.71
Template card no visible ring 7.90 / 5.17
Before After
Table row, dark
Table row, light
Select option, dark
Select option, light
Template card, dark
Template card, light

New keyboard-focus stories (Select, Table clickable row, TemplateCard, SelectionSummary, CreateUserForm login type) let Pixel capture the new focus states.

Decision log
  • Used content-link, the focus color already used by Button, Link, Checkbox, menu items, and command items, instead of introducing a new token.
  • Row and Select item indicators are inset because table and popover containers clip outer rings, matching the approach in fix(site): add visible keyboard focus to audit log rows, menus, and comboboxes #30354.
  • Kept the grey 1px hover outline on rows so only keyboard focus changes.
  • Not addressed: the selected-option check icon color in DEQ-88, so it stays open (white focused vs. grey unfocused) is a selected-state color, not a focus indicator.
  • Left for a follow-up (pre-existing duplication flagged in self-review): CreateUserForm copies the SelectItem class string, and useClickableTableRow repeats the row variant classes from Table.

Generated by Coder Agents on behalf of @chrifro.

Clickable table rows, Select items, and TemplateBuilder cards and summary
buttons now use the content-link focus color that other controls use.
@linear-code

linear-code Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

@chrifro
chrifro requested a review from aqandrew October 30, 2026 10:11
@chrifro
chrifro marked this pull request as ready for review October 30, 2026 10:11
@aqandrew
aqandrew merged commit 24faf30 into main Oct 31, 2026
55 checks passed
@aqandrew
aqandrew deleted the fix-focus-indicator-contrast branch October 31, 2026 00:36
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 31, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants