Skip to content

fix(site): shared design tokens and WCAG AA fixes across catalog and template#84

Merged
TMHSDigital merged 1 commit into
mainfrom
fix/shared-tokens-a11y
Jun 17, 2026
Merged

fix(site): shared design tokens and WCAG AA fixes across catalog and template#84
TMHSDigital merged 1 commit into
mainfrom
fix/shared-tokens-a11y

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Summary

Shared design tokens and accessibility from site-audit.md: C2, A2, A3, A1 (catalog-side), S1 (catalog-side). No VERSION bump ([skip version]).

Findings addressed

  • C2 New site-template/tokens.css is the single source for the shared, non-themeable tokens (neutral palette, text colors, radius, type scale, link hover). The template embeds it via {% include 'tokens.css' %}; the catalog mirrors it in its inline :root. tests/test_design_tokens.py enforces both. Type scale and hover are reconciled through --hero-h1, --stat-size, --link-hover. Per-tool themeable values (accent, hero gradient, background) stay per-surface; container widths are documented as intentionally distinct (catalog card grid vs tool reading column).
  • A2 Light-mode link hover now uses --accent (#7c3aed, 5.7:1) on both surfaces; catalog light --text-muted is #5b6470 (5.35:1 on tinted backgrounds). The three previously-failing pairs (1.85, 2.72, 2.74) now pass AA.
  • A1 Both surfaces wrap content in <main id="main"> with a visually-hidden skip link.
  • S1 Catalog head gains canonical, og:url, and Twitter card tags.
  • A3 Both theme toggles set an aria-label reflecting the current state.

Verification

  • Rendered catalog and tool site in light and dark: no visual regression vs the baseline screenshots.
  • Recomputed the failing contrast pairs: 1.85->5.7, 2.72->5.7, 2.74->5.35 (all >= 4.5:1).
  • Token parity test + sync --check pass. Full suite: 242 passed, 1 skipped.
  • Template still builds the mcp-server site (tokens included, 0 innerHTML, no Jinja leftovers).

🤖 Generated with Claude Code

…template [skip version]

The catalog and the tool-site template shared a design language but no source,
so they drifted on type scale, hover colors, and the variable set (C2). Several
light-mode pairs also failed WCAG AA: link hover at 1.85:1 (catalog) and 2.72:1
(template), and muted tag text at 2.74:1 (A2). Neither surface had a main
landmark or skip link (A1), the catalog lacked canonical and Twitter tags (S1),
and the theme toggles did not expose their state to assistive tech (A3).

- New site-template/tokens.css is the single source for the shared,
  non-themeable tokens (neutral palette, text colors, radius, type scale, link
  hover). The template embeds it via a Jinja include; the catalog mirrors it in
  its inline :root. tests/test_design_tokens.py enforces both. Per-tool
  themeable values (accent, hero gradient, background) stay per-surface. Type
  scale and hover are now reconciled through --hero-h1, --stat-size, and
  --link-hover.
- A2: light-mode link hover now uses --accent (#7c3aed, 5.7:1) on both surfaces
  and the catalog's light --text-muted is #5b6470 (5.35:1 on tinted
  backgrounds). All three previously-failing pairs now pass AA.
- A1: both surfaces wrap content in <main id="main"> with a visually-hidden
  skip link.
- S1: catalog head gains canonical, og:url, and Twitter card tags.
- A3: both theme toggles set an aria-label reflecting the current state.

Verified by rendering both surfaces in light and dark (no visual regression),
recomputing the failing contrast pairs (all now >= 4.5:1), and a token parity
test. Full suite: 242 passed, 1 skipped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: TMHSDigital <TMHospitalityStrategies@gmail.com>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 17, 2026
@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@TMHSDigital TMHSDigital merged commit 6d3ef7c into main Jun 17, 2026
14 checks passed
@TMHSDigital TMHSDigital deleted the fix/shared-tokens-a11y branch June 17, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant