Skip to content

Make runs table rows real links for middle-click + a11y (BEN-46)#50

Merged
benSepanski merged 1 commit intomainfrom
claude/nifty-bardeen-EB0nL
May 4, 2026
Merged

Make runs table rows real links for middle-click + a11y (BEN-46)#50
benSepanski merged 1 commit intomainfrom
claude/nifty-bardeen-EB0nL

Conversation

@benSepanski
Copy link
Copy Markdown
Owner

Context

BEN-46: the dashboard runs table used <tr role="link"> + onClick + onKeyDown (added in BEN-42). Tab + Enter worked, but middle-click / Cmd-click / right-click "open in new tab" didn't — the row wasn't a real link. The ticket strongly preferred wrapping each row in an actual <a href> (the ErrorFeed pattern).

TL;DR

Replace the <table> with a CSS-grid-styled <ul> of one <a href="#/runs/<id>"> per row, so middle-click / Cmd-click open a new tab and keyboard nav comes from the native anchor.

Summary

  • src/web/Dashboard.tsx::RunsTable — drop the <table>/<tr role="link"> shim and the manual onClick + onKeyDown. Each row is now a single <a href="#/runs/${r.id}"> laid out with grid grid-cols-[6rem_minmax(0,1fr)_5rem_8rem_4rem_5rem_5rem_minmax(8rem,max-content)_minmax(8rem,max-content)].
  • Header row is a plain grid <div> mirroring the same grid-cols-[…] template so columns line up with rows.
  • The link carries the row's aria-label="Open run BEN-46: <title>"; focus ring (focus-visible:ring-2 ring-cyan-500) and hover background match BEN-42 styling.
  • Layout matches the existing ErrorFeed / SearchResults patterns (<ul> of <a>); no behavior change for callers, no API change.

Demo

n/a — this CI environment has no browser to capture a screencast (same constraint flagged by PRs #47 and #48). Manual repro: pnpm dev WORKFLOW.md --mock, open http://127.0.0.1:4000, then on any runs-table row:

  • Tab → cyan focus ring on the row.
  • Enter → opens the run detail.
  • Middle-click / Cmd+click → opens detail in a new tab (was broken before).
  • Right-click → "Open Link in New Tab" / "Copy Link" now appears (was missing).

Alternatives

  • Keep the <table> and wrap each <td>'s content in its own <a>. Rejected: nine anchors per row with the same target adds nine tab stops (or ARIA gymnastics to suppress them) and trips axe-core "duplicate link" heuristics. The ticket cited ErrorFeed as the reference shape — ErrorFeed is a <ul> of single anchors, not a multi-anchor table.
  • Keep the <tr role="link"> shim and add onAuxClick/onMouseDown shims for middle-click. Rejected: still loses right-click "Open in New Tab" + "Copy Link", and re-implements behaviour the browser already gives you for free on <a href>.

Test Plan

  • pnpm all — typecheck + fmt:check + lint + 120 tests + 5 evals all green.
  • pnpm build:web — bundle builds (227.06 kB JS / 21.93 kB CSS); confirmed the arbitrary grid-cols-[…] class compiled into the CSS bundle (grid-template-columns:6rem minmax(0,1fr) 5rem …).
  • Manual browser pass: tab focuses each row, Enter opens detail, middle-click + Cmd-click open in a new tab, right-click shows native link affordances.

Closes BEN-46.


Generated by Claude Code

…-46)

The dashboard runs table previously used a <tr role="link"> + onClick +
onKeyDown shim. Tab + Enter worked, but middle-click / Cmd-click / right
"open in new tab" did not — the row wasn't a real link.

Replace the <table> with a CSS-grid-styled <ul> of one <a href="#/runs/<id>">
per row, matching the ErrorFeed and Search pattern. Each row is a single,
genuine anchor: keyboard nav, screen-reader semantics, and the native
new-tab affordances all come for free.
@benSepanski benSepanski merged commit 4558230 into main May 4, 2026
2 checks passed
@benSepanski benSepanski deleted the claude/nifty-bardeen-EB0nL branch May 4, 2026 13:04
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