fix(a11y): home h1, AA-contrast syntax colours, keydown nit - #3
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
h1— the landing had noh1(top heading was<h2 class="lead__title">). Added avisually-hiddenh1with 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$introcan be rendered markdown, which can't legally sit inside anh1.--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.ArrowUp/ArrowDowntest inconsole.jsfor readability (behaviour unchanged).Not changed (from the review)
Verification
node assets/js/console.jspasses;hugo --minifybuilds clean. Contrast values computed, not rendered — worth an eyeball on the light/paper/valentine themes with a code + mermaid post.🤖 Generated with Claude Code