Skip to content

fix(a11y): home h1, AA-contrast syntax colours, keydown nit - #3

Merged
jjsnack merged 1 commit into
mainfrom
fix/pr2-review-a11y
Jul 28, 2026
Merged

fix(a11y): home h1, AA-contrast syntax colours, keydown nit#3
jjsnack merged 1 commit into
mainfrom
fix/pr2-review-a11y

Conversation

@jjsnack

@jjsnack jjsnack commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Follow-up to the review on #2 (now merged). Applies the three unambiguous fixes; leaves the two deliberate tradeoffs (touch theme control, fixed footer) and the optional theme-whitelist as-is.

Fixes

  1. Home page h1 — the landing had no h1 (top heading was <h2 class="lead__title">). Added a visually-hidden h1 with the site title, so the document outline / screen readers get a real page heading while the front-door layout stays visually unchanged. Kept it hidden (rather than promoting the greeting) because $intro can be rendered markdown, which can't legally sit inside an h1.
  2. WCAG AA contrast — light-base + paper syntax --c-yellow/--c-green (strings, functions) were ~3.2–3.7:1 on white/cream; valentine + paper --muted (now used for code comments) were ~3:1. Darkened all to clear 4.5:1.
  3. Keydown precedence — parenthesised the ArrowUp/ArrowDown test in console.js for readability (behaviour unchanged).

Not changed (from the review)

Verification

node assets/js/console.js passes; hugo --minify builds clean. Contrast values computed, not rendered — worth an eyeball on the light/paper/valentine themes with a code + mermaid post.

🤖 Generated with Claude Code

Addresses PR #2 review:
- home page had no h1 (top heading was h2) — add a visually-hidden
  h1 with the site title so the document outline is complete without
  changing the front-door layout
- light-base + paper syntax yellow/green and valentine/paper muted
  were below WCAG AA 4.5:1 as code text — darken them
- parenthesise the ArrowUp/ArrowDown keydown test for clarity

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RbMGFzZfHUfbhid95FjBKb
@jjsnack
jjsnack merged commit e1bb3d1 into main Jul 28, 2026
1 check passed
@jjsnack
jjsnack deleted the fix/pr2-review-a11y branch July 28, 2026 02:58
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