Skip to content

a11y(frontend): bump touch targets, legal line-height, surface Saturn keyboard hint#37

Open
AntiD2ta wants to merge 2 commits intomainfrom
chore/a11y-critique-followups
Open

a11y(frontend): bump touch targets, legal line-height, surface Saturn keyboard hint#37
AntiD2ta wants to merge 2 commits intomainfrom
chore/a11y-critique-followups

Conversation

@AntiD2ta
Copy link
Copy Markdown
Owner

@AntiD2ta AntiD2ta commented Apr 18, 2026

Summary

Addresses three non-blocking follow-ups from the 2026-04-18 design critique plus a deferred P3:

  • P2 header/hero touch targets — the ethstar logo, Propose more repos, Sign in / Sign out, and the hero "Browse the repositories ↓" button were ≤40px tall (WCAG 2.5.5 floor is 44). min-h-11 brings each to 44px without changing visual weight.
  • P3 legal-page reading rhythm/privacy + /cookies prose gets prose-p:leading-[1.7] prose-li:leading-[1.7] so body copy and lists breathe.
  • P3 Saturn keyboard discoverability — the arrow-key roving tabindex and Enter-to-jump were already wired in use-roving-tabindex.ts / saturn-chip.tsx, but the critique reviewer never found them. A new focus-within-revealed KeyboardHint surfaces "← → to navigate · Enter to open · Shift+Enter for actions" once any chip is focused.
  • P3 ⌘K command palette (deferred from Saturn follow-up) — global ⌘K / Ctrl+K palette with cmdk + shadcn CommandDialog. Four groups: Navigate (Home/Privacy/Cookies), Account (conditional Sign in/Sign out), Actions (Propose more repos), Repositories (opens GitHub in new tab — nav-only, no Star action).

How

  • min-h-11 on the five controls (plus min-w-11 on the icon-only Sign out).
  • Tailwind arbitrary prose variants on the three legal <article> elements.
  • Desktop-only KeyboardHint inside the Saturn section; opacity toggle lives as a plain CSS :focus-within rule in index.css keyed on [data-roving-scope="saturn"] to stay decoupled from section class-name churn.
  • Command palette is lazy-loaded; chunk warmed on idle so first-open feels instant. Palette unmounts on close so the search input resets naturally on every open. Capture-phase keydown on window so inputs can't swallow ⌘K. A CommandPaletteContext exposes { open } to any surface; AuthHeader consumes it for the discoverable ⌘K trigger button.
  • Playwright regressions: touch-target sizing (accessibility.spec.ts), Enter-jump and hint reveal (saturn-nav.spec.ts), and 6 palette specs in command-palette.spec.ts (⌘K, Esc, trigger click, Enter-opens-repo with stubbed window.open, cross-route navigation).

Test plan

  • make typecheck / make lint-frontend / make check
  • npm run test:unit -- --run (455/455)
  • npx playwright test e2e/accessibility.spec.ts e2e/saturn-nav.spec.ts e2e/legal-pages.spec.ts e2e/command-palette.spec.ts — all new tests pass
  • Browser-validated at 1280×720: controls measure 44px; prose line-height 1.7; keyboard hint fades in on chip focus; Enter on a focused chip highlights the matching marquee card; ⌘K opens palette from / and /privacy, filtering works, repo selection opens GitHub in a new tab, navigate items route correctly
  • Local review pipeline: spec / security / efficiency / code-quality all APPROVED

…rface Saturn keyboard hint

- Apply min-h-11 to the ethstar logo, Propose more repos, Sign in, Sign out,
  and the hero "browse the repositories" button so every primary control
  clears WCAG 2.5.5 at 44x44 CSS px.
- Bump prose-p/prose-li line-height to 1.7 on /privacy and /cookies articles
  for a calmer reading rhythm on legal copy.
- Add a desktop-only KeyboardHint inside the Saturn section that fades in via
  a plain-CSS :focus-within rule keyed on data-roving-scope="saturn". The
  underlying arrow-key roving tabindex and Enter-to-jump behaviors were
  already wired; this just surfaces the shortcuts so keyboard users discover
  them.
- Cover all three fixes with Playwright regressions: touch-target sizing in
  accessibility.spec.ts; Enter-jump + hint reveal in saturn-nav.spec.ts.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ethstar Ready Ready Preview, Comment Apr 18, 2026 9:35pm

Global ⌘K / Ctrl+K palette built on cmdk + shadcn CommandDialog. Capture-phase
window keydown so inputs can't swallow it; a header trigger button opens it by
click on mouse/touch. Four groups: Navigate (Home/Privacy/Cookies), Account
(conditional Sign in/Sign out), Actions (Propose more repos), Repositories
(opens GitHub in a new tab — nav-only, no Star action duplicating the chip menu).

Lazy-loaded on first open; chunk warmed on idle so first-open feels instant.
Palette unmounts when closed so the search input resets naturally on each open.
Exposed via CommandPaletteContext so AuthHeader and any other surface can call
`useCommandPalette().open()` without prop-drilling.

Covered by 16 Vitest unit tests (groups, filtering, callbacks, no-Star invariant)
and 6 Playwright E2Es (⌘K from /, Esc, click trigger, Enter-opens-repo with
stubbed window.open, Home-from-/privacy navigation, ⌘K on /privacy).
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.

1 participant