Skip to content

chassis: dialog focus management, landmark fixes, reduced motion, skip link#464

Merged
ChBrain merged 1 commit into
mainfrom
chassis/a11y-dialogs-and-landmarks
Jul 4, 2026
Merged

chassis: dialog focus management, landmark fixes, reduced motion, skip link#464
ChBrain merged 1 commit into
mainfrom
chassis/a11y-dialogs-and-landmarks

Conversation

@ChBrain

@ChBrain ChBrain commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Accessibility batch for the shared chassis:

  • Book TOC overlay (role=dialog aria-modal=true) now actually manages focus: focuses the close button on open, traps Tab within the card, restores focus to the opener on close (WCAG 2.4.3 — previously keyboard/SR focus stayed behind the scrim).
  • No more nested <main>: Book.astro's <main class="pb-spreads"><div> (BaseLayout owns the page's main landmark). ⚠️ Requires governance: tag-agnostic selectors in main.test and architecture-playbook.test #460 (tag-agnostic test selectors) to merge first.
  • Skip link: visually-hidden-until-focused "Skip to content" as the first element in <body>, targeting <main id="content">.
  • Reduced motion: smooth scroll + snap CSS and scrollIntoView behavior now respect prefers-reduced-motion; Shelf hover transform likewise.
  • Book's document-wide arrow-key handler now bails on SELECT, contenteditable, and modified keys.
  • Mark.astro defaults to aria-hidden="true" (the brand SVGs contain live <text> glyphs that screen readers announced as stray letters); optional label prop emits role="img" + aria-label instead.
  • Removed prohibited aria-label on generic elements (SiteHeader location span, MnemonicStrip div) — AT ignored these labels, so this is markup-validity cleanup with no information loss. (Visually-hidden text prefixes were tried and deliberately rejected: they violate the word-provenance contract in character-introduction.test.ts.)
  • ChapterCard chapter names h3h2 (fixes the h1→h3 skip on spec pages).

Verification: build + unit + site/architecture/plays a11y groups green on the combined tree with #460.

🤖 Generated with Claude Code

https://claude.ai/code/session_0176ZYTwoV8V4So9SBTizc5X


Generated by Claude Code

@ChBrain
ChBrain force-pushed the chassis/a11y-dialogs-and-landmarks branch from 6fa5b8a to 110df72 Compare July 4, 2026 18:44
@ChBrain
ChBrain merged commit a102651 into main Jul 4, 2026
36 checks passed
@ChBrain
ChBrain deleted the chassis/a11y-dialogs-and-landmarks branch July 4, 2026 18:50
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