Skip to content

fix(web): expose toggle state and tab names to assistive tech - #19

Merged
XuehaiWang merged 1 commit into
mainfrom
fix/a11y-toggle-and-tabs
Nov 25, 2026
Merged

XuehaiWang merged 1 commit into
mainfrom
fix/a11y-toggle-and-tabs

Conversation

@kiri603

@kiri603 kiri603 commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

Three accessibility gaps on the run page:

  1. A log toolbar toggle only carried an on class, so assistive tech could not tell whether regex, case, only-matches, [orbit], wrap or follow was active. Each toggle now reports aria-pressed.
  2. The run tabs put the shortcut digit and the count into their accessible name — Code 3 was read as "Code 3 5". Each tab now has an explicit aria-label, and the count, live dot and shortcut hint are hidden from assistive tech.
  3. Event times were rendered in the viewer locale with no zone. The zone now appears once in the Time header (UTC+8) instead of on every row, which also keeps the table inside a 480px window; a run whose events cross a zone change still labels each row, and every row keeps the raw timestamp in its title.

Validation

Checked in Chrome against a real daemon on /runs/a1f4c2?tab=logs and ?tab=events:

  • Six toolbar buttons report aria-pressed, with [orbit] pressed by default.
  • Tab names read Overview / Logs / Metrics / Artifacts / Code (3) / Trajectory / Events, the current one has aria-current="page", and the count, dot and Kbd are aria-hidden.
  • Events show 11月18日 17:00:00 UTC+8 with UTC+8 in the header, and each row's title is the raw timestamp.
  • At 480px the Events table is 378px inside a 424px page: no horizontal overflow (with a per-row zone label it used to overflow by 25px).

packages/web/test/a11y.test.tsx covers the toggles, the utcOffset helper, the single header label, and the per-row fallback when times span two zones.

A log toolbar toggle only carried an "on" class, so assistive tech could not tell whether
regex, case, only-matches, [orbit], wrap or follow was active. Each toggle now reports
aria-pressed.

The run tabs included the shortcut digit and the count in their accessible name ("Code 3"
was read as "Code 3 5"), so each tab now has an explicit aria-label and the count, live dot
and shortcut hint are hidden from assistive tech.

Event times were rendered in the viewer locale with no zone. The zone now appears once in
the Time header (UTC+8) instead of on every row, which also keeps the table inside a 480px
window; a run whose events cross a zone change still labels each row, and every row keeps
the raw timestamp in its title.
@kiri603
kiri603 requested a review from XuehaiWang as a code owner November 22, 2026 08:45
@XuehaiWang
XuehaiWang merged commit 472f350 into main Nov 25, 2026
1 check passed
@crepuscular-drizzle
crepuscular-drizzle deleted the fix/a11y-toggle-and-tabs branch November 26, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants