Skip to content

fix(site/src): make scrollable agent logs and tool call input keyboard focusable - #32018

Merged
aqandrew merged 4 commits into
mainfrom
a11y/scrollable-region-focusable
Nov 12, 2026
Merged

aqandrew merged 4 commits into
mainfrom
a11y/scrollable-region-focusable

Conversation

@aqandrew

@aqandrew aqandrew commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the remaining axe scrollable-region-focusable violations (WCAG 2.1.1). Keyboard users could not reach two scroll containers to scroll them.

  • Agent logs (AgentLogs): the react-window scroll element is now a focusable region named "Agent logs". Its focus ring is drawn on an overlay so error and warning row backgrounds cannot cover it. In AgentRow, the log tab panel is no longer a tab stop, because the region inside already is. Without this, a per-source tab would have two stops in a row.
  • AI Gateway tool call input (SessionTimeline): the overflow-x-auto <pre> is now a focusable region named <tool> input, with a focus ring.

This follows the existing ScrollArea viewportTabIndex / viewportAriaLabel pattern (tabIndex=0, role="region", a name).

Closes DEQ-122
Closes DEQ-269
Closes DEQ-295
Closes DEQ-458
Closes DEQ-570

Ticket Surface Screenshots
DEQ-122 Workspace page, agent logs before/after
DEQ-269, DEQ-295, DEQ-458, DEQ-570 AI Gateway session threads, expanded tool call input before/after

DEQ-149, DEQ-218, and DEQ-228 (build timeline ChartContent) need no change: axe passes on main because #31656 made the bars inside focusable. Their Linear tickets have a comment that explains this.

Not addressed (nits from self-review, left on purpose):

  • landmark-unique (best practice): several agents, or the same tool called twice, give regions with the same name. The AgentsPage ToolCall.Scrollable regions use fixed names the same way. Unique names for the agent logs would need extra plumbing, because react-window only passes className, style, onScroll, and ref to its outer element.
  • The tool call <pre> is a tab stop even when its content fits. This matches the ScrollArea precedent.
Verification and decision log
  • I ran axe-core 4.11.1 (runOnly: scrollable-region-focusable) against Storybook with Playwright:
    • SessionTimeline/SearchFiltersToolCalls at 500px: the violation reproduces on main and passes on this branch.
    • AgentLogs/Default: passes on main and on this branch, because the source icon buttons inside are focusable. The per-source tab (showSourceIcons={false}) has no focusable content, so it fails on main. Self-review confirmed that it passes on this branch.
    • WorkspaceTimings/NavigateToPlanStage and NavigateToStartStage: pass on main (DEQ-149, DEQ-218, DEQ-228).
  • Grouping: these are two root causes in one PR (one PR per axe rule). There are 31 non-test changed lines.
  • I used outerElementType because it is the only react-window v1 hook that sets attributes on the scroll element. LogsViewport is at module scope, so it stays stable across renders.
  • The jsx-a11y/no-noninteractive-tabindex disables follow the precedent in SecretsTable.tsx. A scrollable region must be focusable.
  • Tests: the AgentLogs tab-order test now expects the region first. A new SessionTimeline test checks that the tool call input region takes keyboard focus.

🤖 Generated by Coder Agents on behalf of @aqandrew.

@aqandrew
aqandrew temporarily deployed to main November 10, 2026 20:52 — with GitHub Actions Inactive
@aqandrew
aqandrew temporarily deployed to main November 10, 2026 20:52 — with GitHub Actions Inactive
@linear-code

linear-code Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

@aqandrew
aqandrew temporarily deployed to main November 10, 2026 20:54 — with GitHub Actions Inactive
@aqandrew
aqandrew marked this pull request as ready for review November 10, 2026 21:02
@aqandrew
aqandrew temporarily deployed to main November 10, 2026 21:02 — with GitHub Actions Inactive

@chrifro chrifro 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.

[reviewer-agent] round 1: one should-fix, otherwise this is in good shape.

Verified at e68bc74a0e: scope is site/ only, 31 non-test lines, required CI is green, and the unit tests pass locally. In Storybook, axe scrollable-region-focusable passes on AgentLogs/Default, AgentLogs/Overflowed, AgentRow/LogsTabs, and SessionTimeline/SearchFiltersToolCalls (500px). The logs region is a single tab stop in AgentRow (Copy, Download, Agent logs, then the next control). The overlay ring and the <pre> ring both render (ring-content-link, 2px). Arrow keys scroll the focused tool call input to its end.

Should-fix

  • AgentLogs.tsx:179 and SessionTimeline.tsx:257: the new focus states have no story. See the inline comment.

Nits (optional)

  • AgentLogs.tsx:181: aria-hidden="true" could use the aria-hidden shorthand, as line 314 of the same file does (site/AGENTS.md: JSX shorthand for true booleans).
  • AgentLogs.tsx:131: peer focus-visible:outline-hidden could be its own cn(...) group, separate from the layout classes.
  • landmark-unique (best practice, not WCAG A/AA): several "Agent logs" regions, or repeated <tool> input names, can share a page. This was already called out in the PR body and matches ToolCall.Scrollable. I am fine leaving it.

Follow-ups filed: none.

🤖 Generated by Coder Agents on behalf of @chrifro.

@chrifro
chrifro marked this pull request as draft November 11, 2026 10:36
@aqandrew
aqandrew marked this pull request as ready for review November 12, 2026 21:20
@aqandrew
aqandrew temporarily deployed to main November 12, 2026 21:20 — with GitHub Actions Inactive
@aqandrew
aqandrew temporarily deployed to main November 12, 2026 21:24 — with GitHub Actions Inactive
@aqandrew

Copy link
Copy Markdown
Collaborator Author

Nit from the round 1 review: the focus ring overlay in AgentLogs.tsx now uses the aria-hidden shorthand. Fixed in b68d2db.

🤖 Generated by Coder Agents on behalf of @aqandrew.

@aqandrew
aqandrew merged commit a3469f1 into main Nov 12, 2026
27 checks passed
@aqandrew
aqandrew deleted the a11y/scrollable-region-focusable branch November 12, 2026 22:15
@aqandrew
aqandrew temporarily deployed to docs-preview November 12, 2026 22:15 — with GitHub Actions Inactive
@aqandrew
aqandrew temporarily deployed to main November 12, 2026 22:15 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 12, 2026

This branch was previously deployed

2 inactive deployments
docs-preview — a2988a3e Deployed Nov 12, 2026 by aqandrew via cleanup #14
main — a2988a3e Deployed Nov 12, 2026 by aqandrew via cla #255334
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