Skip to content

fix: give icon tooltip triggers a button role and name - #30819

Merged
aqandrew merged 1 commit into
mainfrom
fix/icon-tooltip-trigger-names
Nov 6, 2026
Merged

aqandrew merged 1 commit into
mainfrom
fix/icon-tooltip-trigger-names

Conversation

@aqandrew

@aqandrew aqandrew commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 This PR was created by Coder Agents on behalf of @aqandrew.

Fixes the button-role-name-missing (WCAG 4.1.2) findings in DEQ-541 items 1 and 2. Item 3 (build timeline stage info icons) was fixed on main by #31656. These tooltip triggers were attached straight to a bare svg or img, so they had no role or accessible name.

Part of DEQ-541 (items 1 and 2). Item 4 (build timeline bars) is handled separately with DEQ-232.

Location Element Fix
All logs Log source icons <button aria-label="<source name>"> on the first line of each run from the same source
History sidebar Build reason info icon Reason added to the build link's accessible name (sr-only)

Adds Vitest coverage in AgentLogs.test.tsx and WorkspaceBuildData.test.tsx. Both fail without the fix. Adds a SourceIconFocused story so Pixel captures the focus ring and the tooltip opened from the keyboard.

Implementation notes and review decisions

Scope. The original plan grouped every button-role-name-missing ticket for icon tooltip triggers. Most of them were already handled elsewhere, so this PR covers only what was left:

Mapping axe selectors to components

  • Item 1, section:nth-of-type(9) info icon in History: WorkspaceBuildData (rendered by HistorySidebar and WorkspaceBuildPageView).
  • Item 2, img alt="" and the dashed-line div with data-state: the source icon in AgentLogs.
  • Item 3, lucide-info next to provisioning and agent stage labels: StagesChart, already fixed on main by fix(site/src): make keyboard-inaccessible controls operable by keyboard #31656 with InfoTooltip.

Decisions

  • History build reason: no button. In both sidebars the whole build row is a link, so a <button> inside it would be nested interactive content (axe nested-interactive), and clicking it would also follow the link. Instead the icon is aria-hidden and the reason is sr-only text in the link's accessible name ("start by admin, build reason: CLI"). Tradeoff: sighted keyboard users still can't open the visual tooltip, as before. Showing the reason as visible text, or opening the tooltip when the link has focus, would need a design decision.
  • Log source continuation lines (the dashed connector) are now aria-hidden and have no tooltip. Before, every line had a hover trigger. Making each line a button would add a tab stop per log line. Mouse users now hover the first icon of a run to see the source name.
  • No shared icon-trigger component. The log source button wraps an image or a colored dot, not an info icon, so InfoTooltip doesn't fit it.
  • Left m-0 border-0 bg-transparent p-0 off the new button, because Tailwind preflight and index.css already apply them.
  • Known nit: the log source button's name and tooltip description are the same text, so screen readers may read the source name twice.

Verification

  • pnpm lint:types, biome check, and make pre-commit (via the hook) pass.
  • Unit tests: AgentLogs, WorkspaceBuildData. Each new test was confirmed to fail against the original components.
  • Storybook tests: AgentLogs, WorkspaceBuildData, AgentRow, Workspace, WorkspaceBuildPageView (66 tests) pass.
  • The frontend-deep-review and frontend-review audits were run, and their blocking and should-fix findings were fixed or recorded above.
  • Not checked: the workspace page in a real browser with a screen reader.

@linear-code

linear-code Bot commented Oct 14, 2026

Copy link
Copy Markdown

DEQ-541

@aqandrew
aqandrew marked this pull request as ready for review October 31, 2026 00:16
@aqandrew
aqandrew requested a review from jeremyruppel October 31, 2026 00:16
Fixes the remaining axe button-role-name-missing findings in DEQ-541
items 1 and 2. Item 3 (build timeline stage info icons) was fixed on
main by #31656.

- All logs source icons are now buttons named after the log source. Only
  the first line of each run from the same source is a trigger;
  continuation lines are decorative, so long logs don't add a tab stop
  per line.
- History build reason icons sit inside the build link, so the reason is
  added to the link's accessible name instead of a nested control.
@aqandrew
aqandrew force-pushed the fix/icon-tooltip-trigger-names branch from 070a021 to 6918da8 Compare November 5, 2026 21:33
@aqandrew
aqandrew merged commit da45d9f into main Nov 6, 2026
27 of 28 checks passed
@aqandrew
aqandrew deleted the fix/icon-tooltip-trigger-names branch November 6, 2026 21:00
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 6, 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