Skip to content

fix(site/src): make keyboard-inaccessible controls operable by keyboard - #31656

Merged
aqandrew merged 1 commit into
mainfrom
a11y/keyboard-inaccessible
Nov 4, 2026
Merged

aqandrew merged 1 commit into
mainfrom
a11y/keyboard-inaccessible

Conversation

@aqandrew

@aqandrew aqandrew commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Makes the controls that the Deque audit flagged as keyboard-inaccessible (WCAG 2.1.1) reachable and operable with the keyboard alone.

  • Comboboxes without a search input (SelectFilter status, action, and resource type menus): on open, focus moves to the command listbox instead of the popover, so the arrow keys and Enter now work. The listbox does not draw its own outline because the highlighted option already has a ring.
  • Date range picker: no longer blocks the popover's auto-focus, so focus lands on the selected quick-range radio.
  • Notification inbox item: the mark-as-read button is visually hidden (not display: none) until the item is hovered or contains focus, so it stays in the tab order.
  • Workspace breadcrumb (owner, organization, workspace): the popover triggers are real <button>s instead of <span>s. This also clears 3 critical aria-allowed-attr axe violations on main:
    • Closes DEQ-143 (owner breadcrumb)
    • Closes DEQ-25 (organization breadcrumb)
    • Closes DEQ-552 (workspace breadcrumb)
  • AI Gateway session threads: the Back button is a real button again instead of a span rendered through asChild.
  • Build timeline: stage info icons use InfoTooltip (a focusable button), and resource bars are focusable like the script bars.

Closes DEQ-198
Closes DEQ-214
Closes DEQ-289
Closes DEQ-338
Closes DEQ-394
Closes DEQ-502
Closes DEQ-542
Closes DEQ-545
Refs DEQ-493

Ticket Surface Change
DEQ-198 AI Gateway session threads Back button (el 1) El 2 (session info/token tooltips) was already fixed on main by #30403/#30424.
DEQ-214 AI Gateway sessions date range picker (el 1), filter menus (el 2) El 3 (header info icon) was already fixed on main by #30403.
DEQ-289 SMTP settings icons Already fixed on main by #30403. No change here.
DEQ-338 Audit log filter menus (el 1) El 2 (row info icon) was already fixed on main by #30403.
DEQ-394 Users status filter menu (el 1) El 2 (+N more roles) was already fixed on main by #30342.
DEQ-493 Workspace breadcrumb (el 1), timeline stage info icons (el 4), resource bars (el 5) Els 2 and 3 are still open; see below.
DEQ-502 Footer items Already fixed on main by #30403/#30424. No change here.
DEQ-542 Workspaces status filter menu (el 1) El 2 (sharing indicator) was already fixed on main by #30403.
DEQ-545 Notification inbox mark-as-read See screenshots below.

Screenshots

From Storybook, main (before) versus this branch (after).

Surface Before After
Back button focused (DEQ-198) back before back after
Date range picker opened with Enter: focus on the selected quick range (DEQ-214) timerange before timerange after
Filter menu opened with Enter: focus on the listbox (DEQ-214, 338, 394, 542) selectfilter before selectfilter after
Unread inbox item focused: mark-as-read visible and tabbable (DEQ-545) inbox before inbox after
Workspace breadcrumb focused (DEQ-493 el 1) topbar before topbar after
Timeline stage info icon focused (DEQ-493 el 4) stageinfo before stageinfo after
Resource bar focused (DEQ-493 el 5) resourcebar before resourcebar after

Not fixed here (DEQ-493 stays open):

  • El 2, the build-reason info icon in the history sidebar (WorkspaceBuildData): the icon sits inside the build row's <a> in both callers, so a focusable trigger would nest one interactive control inside another. Fixing it needs a layout change that moves the icon out of the link, or a different way to show the reason.
  • El 3, the log source icons in AgentLogs: they repeat on every line of a virtualized list, so making each one a tab stop would add one stop per log line. This needs a design decision, for example showing the source name as text or as a single legend.

Review findings not acted on:

  • The ResourcesChart tooltip's "view template" link has a placeholder to="". This is pre-existing and out of scope.
  • The visually hidden mark-as-read button stays in the tab order on purpose: it becomes visible when focused, like a skip link.
  • The breadcrumb buttons reset styles that preflight already resets, to match the Tooltip trigger pattern.
  • Not verified: whether the InfoTooltip focus ring is clipped by the YAxisLabel overflow-hidden. The focused-stage story is there for Pixel to show it.
  • Pre-existing axe findings that this PR does not touch: aria-dialog-name (popover), scrollable-region-focusable (SelectFilter list), list (timings).
Grouping and decision log
  • One PR for the whole keyboard-inaccessible label, following the one-PR-per-axe-rule convention. About 89 non-test lines, all under site/.
  • Checked every element on all nine tickets against main first. fix(site/src): make text-only tooltip triggers keyboard focusable #30403 (focusable tooltip triggers), fix(site/src): make tooltips with links keyboard and screen reader accessible #30424 (interactive tooltips), and fix(site): make extra roles keyboard accessible #30342 already fixed several of them, and the table records those.
  • Comboboxes: the fix lives in the shared ComboboxContent, so every search-less combobox gets it. It only takes over auto-focus when no [cmdk-input] is present and the caller has not prevented it.
  • Date range picker: the preventDefault on onOpenAutoFocus dates from feat(site/src/components): add date-time range picker with quick picks #28392. Without it, Radix focuses the first tabbable element, which is the selected radio.
  • New Vitest tests (SelectFilter.test.tsx, plus one in DateTimeRangePicker.test.tsx) fail on main and pass here. New focus-state stories (UnreadFocused, WorkspaceBreadcrumbFocused, StageInfoFocused, ResourceBarFocused) only set up focus for Pixel screenshots.
  • Inbox stories now scope the mark-as-read query to one item, because every unread item's button is now in the accessibility tree.
  • The breadcrumb buttons measure about 2px narrower than the old spans because of sub-pixel rounding. Accepted as negligible.
  • Ran pnpm check, pnpm lint, pnpm format, the targeted unit tests (245 passed), Storybook tests for the affected areas (296 passed), the frontend-review FE1–FE10 audit, and frontend-deep-review. Applied its fixes: InfoTooltip instead of a hand-rolled trigger, a not-* variant instead of not-sr-only, focusing the cmdk list, and stories with no play assertions.

🤖 Generated by Coder Agents on behalf of @aqandrew.

Focus the listbox in search-less comboboxes, let the date range picker focus its selected quick range, keep the inbox mark-as-read button in the tab order, render workspace breadcrumb triggers as buttons, drop the span-backed Back button, and make timing stage info icons and resource bars focusable.
@linear-code

linear-code Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

@aqandrew
aqandrew marked this pull request as ready for review November 3, 2026 00:44

@jeremyruppel jeremyruppel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks great, so 👍 from me! i'm guessing we also need Design 👀 on the focus rings?

@tracyjohnsonux tracyjohnsonux left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ignoring some of the odd screens that the agent added to confuse me. All good!

@aqandrew
aqandrew merged commit 42640dc into main Nov 4, 2026
66 of 67 checks passed
@aqandrew
aqandrew deleted the a11y/keyboard-inaccessible branch November 4, 2026 22:08
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 4, 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.

3 participants