fix(website): docs polish 3/3 — a11y and interaction - #865
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
blove
enabled auto-merge (squash)
August 30, 2026 01:51
Contributor
The final third of the docs polish arc (findings §6, §7). Every behavior verified interactively in a live browser. - DocsSearch becomes a real dialog: role=dialog + aria-modal, focus remembered on open and restored on close, Tab trapped (the combobox input is the only tab stop; options are arrow-key territory), input is a combobox with aria-activedescendant over a listbox of options, and the keyboard-selected option scrolls into view. Phones finally get a way in: a Search docs entry in the mobile nav's docs panel (it was Cmd-K-only, with the trigger in the desktop-only sidebar). - PageActions is a real menu: first item focused on open, ArrowUp/Down/ Home/End rove, Escape closes and restores the trigger, and items gain hover/focus states (they had none). - mdx Tabs gets the full ARIA tabs pattern mirroring ui/TabGroup (which already had it): roles, roving tabindex, arrow-key selection, labelled panel — plus a horizontally scrollable tab bar on narrow screens. - One shared :focus-visible ring across the docs chrome (nav links, crumbs, TOC, sidebar controls, menu, search results, tabs, copy buttons, heading anchors) — none had any focus affordance. - Heading anchors are visible on touch (inline after the heading at 0.35 opacity) instead of display:none — phones could not copy a deep link. - 44px touch targets for the 32px actions trigger and 28px code-copy button via inset pseudo hit areas, no visual growth (WCAG 2.5.8). - scroll-behavior:smooth now respects prefers-reduced-motion. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
blove
force-pushed
the
blove/docs-polish-3-a11y
branch
from
August 30, 2026 01:52
f8ad265 to
7ad94a9
Compare
Contributor
Contributor
blove
added a commit
that referenced
this pull request
Aug 30, 2026
… wrapper (#870) Two related repairs to the website e2e lane: 1. Docs search spec: #865's a11y pass gave search results role="option", and an explicit ARIA role overrides the implicit button role — so getByRole('button') stopped matching and main's website e2e has been red since. The spec now queries role 'option'. (Verified the failure reproduces identically on pristine main before touching anything.) 2. run-e2e-with-next-env-restore.ts existed to rewrite next-env.d.ts to canonical content after e2e, protecting a then-tracked file from dirty- tree churn. #862 untracked the file, and the dangling dev-path content the wrapper guarded against breaks nothing today — verified by writing that exact content with the referenced path absent: lint 0, test 0, build 0 (website has no typecheck target, and build regenerates the file first). The e2e target now runs the playwright executor directly; the wrapper and its extra target indirection are gone. Website e2e: 49/49 with the folded target. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
blove
added a commit
that referenced
this pull request
Aug 30, 2026
Tier 1+2 of the docs visual redesign (Namespace-reference analysis): - PageActions becomes a labeled 'Copy page' split button — the primary segment copies the page as Markdown directly; the chevron opens the existing actions menu (ChatGPT / View as Markdown / Edit on GitHub) with the #865 keyboard a11y preserved. Both segments keep 44px hit areas via ::after extension (overflow: hidden dropped in favor of per-segment radii so the hit areas aren't clipped). - TOC becomes a scroll-position indicator: continuous hairline rail, active link paints an accent bar segment + 500 weight. Active tracking now computes 'last heading above the reading line' instead of an IntersectionObserver band, so jump-scrolls and hash navigation always yield an active item. - Sidebar: per-section stroke glyphs (getting-started/guides/concepts/ components/a2ui/api/reference), search trigger gains a leading search icon and a real <kbd> ⌘K chip, nav links get more vertical air and a 500-weight active state. - Docs index grid: 20px gap + min() clamp on the column floor. Verified in-browser: menu keyboard flow (focus first item, Escape, focus restore), active-rail accent (#004090) computes on data-active, 44px hit targets, no horizontal overflow at 375. nx test website green, lint 0 errors, production build green. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PR 3 of 3 — the a11y + interaction third of the docs polish arc (plan · findings §6–§7). This PR closes the arc.
Every behavior below was driven and verified in a live browser, not assumed:
role=dialog+aria-modal; Tab trapped; combobox + listbox +aria-activedescendant; Escape closes and restores focus to the opener; selected option scrolls into view; a Search entry in the mobile nav opens itinset:-6pxpseudoui/TabGroup— ArrowRight measured flippingaria-selectedand roving tabindex to[-1, 0]; scrollable bardisplay:noneunder 768px — no deep links from phones:focus-visiblering (--shadow-focus) across 14 control classesprefers-reduced-motion: no-preferenceGates:
nx test websitefully green, 0 lint errors, prod build green.The arc, closed
Original review (2026-08-29) → findings audit → Project 1 tokens (#845) → Project 2 substrate (#848–#858) → Project 3 polish (#861, #863, this). Every measured defect in the audit is now fixed or explicitly deferred (§10 font unification — its own decision; toast width — logged).
🤖 Generated with Claude Code