Skip to content

fix(a11y): address audit findings on docs site + sidebar#267

Merged
kevinccbsg merged 4 commits into
mainfrom
fix/a11y-issues
Jun 9, 2026
Merged

fix(a11y): address audit findings on docs site + sidebar#267
kevinccbsg merged 4 commits into
mainfrom
fix/a11y-issues

Conversation

@kevinccbsg

@kevinccbsg kevinccbsg commented Jun 9, 2026

Copy link
Copy Markdown
Member

What

Accessibility fixes for the docs site (twd.dev), addressing findings from the June 2026 WCAG 2.2 A/AA audit. Scope is the VitePress docs site only — the twd-js sidebar tool (src/) is a separate follow-up.

Changes

Focus indicator (2.4.7 / 2.4.11 / 1.4.11)

  • Global :focus-visible ring: 2px solid --vp-c-text-1 with 2px offset (theme-aware, clears 3:1 in both themes).
  • Inset variant (outline-offset: -2px) for focus targets inside overflow: hidden containers — FAQ accordion, custom + markdown code blocks, and the "On this page" outline — so the ring isn't clipped.
  • Removed outline: none overrides in LandingCrossLinks and AdoptionLineDiagram.

Contrast (1.4.3)

  • Split the github shiki comment token #6A737D (fails AA in both themes) into #57606a light / #8b949e dark.
  • .code-filename and .landing-xlinks__blurb: --vp-c-text-3--vp-c-text-2.

Links (1.4.1 / 2.4.4)

  • Underline the manifesto link and cross-link card titles (no longer color-only). Scoped to landing surfaces.
  • sr-only context on the manifesto link.

Cognitive / readability (COGA — 3.1.5 / 1.4.8)

  • Removed sustained uppercase on hero/landing eyebrows and adoption-line eyebrow/badge strings (now sentence case); tightened letter-spacing.

Screen-reader structure (4.1.2)

  • Adoption-line cards use <h3> for the package name, so the non-link "Merge with confidence" end-state card is reachable via heading navigation.

Not included (intentional)

  • Body-content link underlines (kept color + brand only, by decision).
  • Search modal cognitive-load (VitePress plugin, not changeable).
  • Text-spacing (1.4.12) check — layout is flexible; parked, no failure observed.
  • Sidebar tool colors / keyboard nav in src/ — separate work.

Verify

Run npm run docs:dev, tab through the homepage + a sub-product page (e.g. /twd-js) in both light and dark themes; confirm a visible focus ring everywhere (inset on accordion/code/outline), readable code comments, underlined landing links, and sentence-case eyebrows.

🤖 Generated with Claude Code


Update: sidebar tool a11y (src/)

Also includes accessibility fixes for the twd-js sidebar test list:

  • Removed forced uppercase on describe group headers (render in author's casing).
  • Describe headers: bold (700) + brighter default describeText (#94a3b8 → #f1f5f9) for legibility and AA contrast; test names use normal (400). Hierarchy now carried by weight + box, not uppercase.
  • Kept the --twd-describe-text token in CSS so the describeText theme option still works — only its default changed.

kevinccbsg and others added 4 commits June 9, 2026 17:58
Resolves WCAG 2.2 A/AA findings from the June 2026 accessibility audit
for the VitePress docs site:

- Focus ring: global 2px visible indicator with 2px offset (theme-aware
  via --vp-c-text-1); inset variant for elements clipped by overflow:hidden
  containers (FAQ accordion, code blocks, page outline) so the ring stays
  visible (2.4.7 / 2.4.11 / 1.4.11).
- Code contrast: split the github shiki comment token (#6A737D, fails AA in
  both themes) into #57606a light / #8b949e dark; bump .code-filename to
  text-2 (1.4.3).
- Landing links: underline manifesto link + cross-link card titles so they
  aren't color-only; fix .landing-xlinks__blurb contrast (text-3 -> text-2)
  (1.4.1 / 1.4.3).
- Manifesto link: add sr-only context for link purpose (2.4.4).
- Remove decorative manifesto quote mark.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sustained all-caps hurts readability for dyslexic users (WCAG 3.1.5 / 1.4.8
recommendation from the a11y audit). Remove text-transform: uppercase on the
hero and landing eyebrows, sentence-case the adoption-line eyebrow/badge
strings, and tighten the letter-spacing that was tuned for caps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The 4th adoption-line card ("Merge with confidence") is intentionally not a
link, so it was skipped by Tab-key navigation and the auditor never heard it.
Promote each card's package name to an <h3> so screen-reader users reach every
card (including the non-link end-state) via heading navigation, giving the
adoption path proper document structure. Visual layout is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sidebar test-list a11y tweaks from the audit:
- Drop forced uppercase on describe group headers (COGA readability); they
  now render in the author's original casing.
- Bold (700) weight + brighter default describeText (#94a3b8 -> #f1f5f9) so
  headers read as headers and clear AA contrast; test names use normal (400)
  weight. Hierarchy now carried by weight + box rather than uppercase.
- Keep the --twd-describe-text token in CSS so the describeText theme option
  still works — only its default value changed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kevinccbsg kevinccbsg changed the title fix(docs): address a11y audit findings on docs site fix(a11y): address audit findings on docs site + sidebar Jun 9, 2026
@kevinccbsg kevinccbsg merged commit 173d5a4 into main Jun 9, 2026
9 checks passed
@kevinccbsg kevinccbsg deleted the fix/a11y-issues branch June 9, 2026 17:27
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