Skip to content

fix(site): text contrast in dark mode and code highlighting - #274

Merged
accesswatch merged 1 commit into
mainfrom
fix/dark-mode-contrast
Oct 28, 2026
Merged

accesswatch merged 1 commit into
mainfrom
fix/dark-mode-contrast

Conversation

@accesswatch

Copy link
Copy Markdown
Collaborator

A contrast scan of the live site (every text element against its real background, in light and dark mode) found text below WCAG 1.4.3's 4.5:1:

  • Dark mode: the breadcrumb (3.64:1 and 2.96:1), the footer (2.96:1), and every code block, which used the light highlight theme on a dark background (as low as 1.18:1).
  • Light mode: the highlight theme's orange, green and red on the code background (3.28:1 to 4.3:1).

Fix, in scripts/build-html.js: code blocks use GitHub's dark highlight theme in dark mode; the four short colours are replaced with GitHub's own shades of the same hue (#953800, #116329, #cf222e, and #58a6ff in dark); the breadcrumb and footer get dark-mode colours. Only html/styles/ changes.

Verified: a re-scan of all 223 site pages with Playwright, in light and dark mode, finds nothing under 4.5:1.


Generated by Claude Code

A contrast scan of every page in light and dark mode found text under
4.5:1: in dark mode the breadcrumb, footer and all code blocks (the
light highlight theme was used on a dark background, down to 1.18:1),
and in light mode the orange, green and red highlight colours on the
code background (3.28:1 to 4.3:1).

Code blocks now use GitHub's dark highlight theme in dark mode, the
four short colours are replaced with GitHub's own shades of the same
hue, and the breadcrumb and footer get dark-mode colours. A re-scan of
all 223 pages finds nothing under 4.5:1 in either mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PmRBrUTuhzYnQBFxUCN6Vr
@github-actions

Copy link
Copy Markdown
Contributor

Peer Review Assigned

Hi @accesswatch! Your PR has been automatically paired with @taylorarndt for peer review.

For @taylorarndt:

This is a great opportunity to practice code review skills! Here's what to look for:

Content Quality:

  • Does the change accomplish what the issue describes?
  • Is the writing clear and helpful?
  • Are there any typos or grammar issues?

Accessibility:

  • Proper heading hierarchy (H1 → H2 → H3, no skips)?
  • Descriptive link text (not "click here")?
  • Alt text on images?
  • [TODO] markers removed?

Documentation:

  • Code blocks are properly formatted?
  • Tables have headers?
  • References/links work correctly?

Review Guidelines:

  • Be kind and constructive
  • Suggest improvements, don't just point out problems
  • Ask questions if something is unclear
  • Approve when ready or request changes with explanation

Resources:


Pairing by Learning Room Grouping Engine

@accesswatch
accesswatch merged commit fb48bab into main Oct 28, 2026
3 checks passed
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.

2 participants