Skip to content

Make wcag_check.py the runnable canonical WCAG checker - #178

Open
mapgie wants to merge 1 commit into
mainfrom
claude/wcag-check-runnable
Open

Make wcag_check.py the runnable canonical WCAG checker#178
mapgie wants to merge 1 commit into
mainfrom
claude/wcag-check-runnable

Conversation

@mapgie

@mapgie mapgie commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Problem

The repo shipped two WCAG contrast-checker files at the root:

  • wcag_check_real.py — the real, runnable plaintext script.
  • wcag_check.py — actually just the base64 encoding of wcag_check_real.py.

So python3 wcag_check.py failed with a SyntaxError (Python tried to parse base64 text as source), even though every doc and the Color.kt header tell contributors to run exactly that command. Both files were introduced together in 14e959f (an unrelated slider-fix PR).

Verified the encoding relationship before changing anything: diff <(base64 -d wcag_check.py) wcag_check_real.py was byte-identical.

Fix

  • Replaced wcag_check.py with the actual plaintext script (its internal docstring already names itself wcag_check.py).
  • Deleted the now-redundant wcag_check_real.py.
  • No reference updates were needed: docs and the Color.kt comment already name wcag_check.py, and a repo-wide grep for wcag_check_real now returns nothing.

No colour values, THEMES data, PAIRS list, or check logic were touched. This is purely a runnability + de-duplication fix.

Verification

  • python3 wcag_check.py — exit 0 (405 pairs across 27 themes, all pass)
  • python3 wcag_check.py --fails-only — exit 0, no failures
  • python3 wcag_check.py coral — exit 0
  • python3 a11y_check.py — exit 0 (untouched)
  • grep -ri wcag_check_real — no matches
  • No changelog fragment required: check_changelog_fragment.py's APP_CODE_PATTERNS covers *.kt/*.xml/*.gradle.kts/gradle files only, not .py.

History

Originally opened stacked on #176 (the palette reconciliation). #176 has since been squash-merged to main, so this branch was rebuilt directly on top of main as a single clean commit that applies only the runnable + de-duplication change. No conflicts; the reconciled palette values already on main are preserved (the new plaintext wcag_check.py is the decode of main's reconciled base64 file).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Hz3A1rUUrbhVHcRWgguUFD

Base automatically changed from claude/theme-palette-reconciliation to main August 22, 2026 19:26
@mapgie
mapgie marked this pull request as ready for review August 22, 2026 19:26
wcag_check.py shipped as the base64 encoding of wcag_check_real.py, so
'python3 wcag_check.py' (what CLAUDE.md and the Color.kt header tell
contributors to run) failed with a SyntaxError. Replace wcag_check.py with the
actual plaintext script and delete the now-redundant wcag_check_real.py. No
references needed updating (docs and Color.kt already name wcag_check.py). No
colour values, THEMES data, PAIRS, or check logic changed; purely runnability
and de-duplication.

Verified: python3 wcag_check.py exits 0 (405 pairs across 27 themes pass);
a11y_check.py clean; no repo references to wcag_check_real remain.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hz3A1rUUrbhVHcRWgguUFD
@mapgie
mapgie force-pushed the claude/wcag-check-runnable branch from 9f3115b to 3b284aa Compare August 22, 2026 19:37
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