Skip to content

fix(website): docs polish 3/3 — a11y and interaction - #865

Merged
blove merged 2 commits into
mainfrom
blove/docs-polish-3-a11y
Aug 30, 2026
Merged

fix(website): docs polish 3/3 — a11y and interaction#865
blove merged 2 commits into
mainfrom
blove/docs-polish-3-a11y

Conversation

@blove

@blove blove commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

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:

control before verified after
DocsSearch ⌘K-only, no dialog semantics, no trap, no mobile entry 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 it
PageActions menu with no keyboard nav, no item states, 32px target first item focused on open; Arrow/Home/End rove (measured: ArrowDown → "Open in ChatGPT"); Escape → focus back on trigger; hover/focus states; 44px hit area via inset:-6px pseudo
mdx Tabs bare buttons full ARIA tabs pattern mirroring ui/TabGroup — ArrowRight measured flipping aria-selected and roving tabindex to [-1, 0]; scrollable bar
heading anchors display:none under 768px — no deep links from phones inline after the heading at 0.35 opacity
focus rings none anywhere in docs chrome one shared :focus-visible ring (--shadow-focus) across 14 control classes
smooth scroll unconditional wrapped in prefers-reduced-motion: no-preference

Gates: nx test website fully 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

@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview Aug 30, 2026 1:56am

Request Review

@blove
blove enabled auto-merge (squash) August 30, 2026 01:51
@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

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
blove force-pushed the blove/docs-polish-3-a11y branch from f8ad265 to 7ad94a9 Compare August 30, 2026 01:52
@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@blove
blove merged commit c4d0057 into main Aug 30, 2026
6 checks passed
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>
@blove
blove deleted the blove/docs-polish-3-a11y branch September 3, 2026 22:30
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