Skip to content

feat(a11y): make the deck keyboard and screen-reader navigable#4

Open
Reebz wants to merge 1 commit into
bluedusk:mainfrom
Reebz:feat/accessibility
Open

feat(a11y): make the deck keyboard and screen-reader navigable#4
Reebz wants to merge 1 commit into
bluedusk:mainfrom
Reebz:feat/accessibility

Conversation

@Reebz

@Reebz Reebz commented Jun 9, 2026

Copy link
Copy Markdown

What

The deck was not usable by keyboard or screen-reader users. Nav dots were non-focusable divs, inactive slides stayed in the accessibility tree, and slide changes were silent.

  • Nav dots are now <button type="button"> with aria-label="Go to slide N of M" and aria-current on the active dot, so they take focus and activate on Enter and Space for free.
  • Inactive slides carry inert and aria-hidden, so a screen reader reads only the active slide and Tab skips hidden controls.
  • Focus moves to the active slide on navigation, and each change is announced through a visually hidden aria-live="polite" region.
  • CSS adds a button reset so the dots look unchanged, a :focus-visible ring visible only for keyboard users, and an .sr-only utility for the live region.

Mirrored into assets/slides-runtime.js and the inline runtime in references/html-template.md, including the .sr-only and focus styles, with the contract documented in references/presentation-layer.md.

Test

  • Dots are reachable by Tab and activate on Enter and Space, moving to the right slide.
  • Only the active slide is in the accessibility tree, and Tab does not reach controls inside hidden slides.
  • Changing slides announces "Slide N of M" through the live region.
  • The focus ring shows for keyboard users and not for mouse users.

Dependencies

Touches slides-runtime.js, so it is cleanest to merge after the nav-input-hardening PR.

Co-Authored-By: Leslie Barbara Knope (Claude Opus 4.8 (1M context)) noreply@anthropic.com

The deck was unusable by keyboard and screen-reader users: nav dots were non-focusable divs, inactive slides stayed in the accessibility tree, and slide changes were silent. Make dots real buttons with aria-current, mark inactive slides inert and aria-hidden, move focus to the active slide, and announce each change through a polite live region.

Co-Authored-By: Leslie Barbara Knope (Claude Opus 4.8 (1M context)) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

@Reebz is attempting to deploy a commit to the bluedusk's projects Team on Vercel.

A member of the Team first needs to authorize it.

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