Make wcag_check.py the runnable canonical WCAG checker - #178
Open
mapgie wants to merge 1 commit into
Open
Conversation
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
force-pushed
the
claude/wcag-check-runnable
branch
from
August 22, 2026 19:37
9f3115b to
3b284aa
Compare
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.
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 ofwcag_check_real.py.So
python3 wcag_check.pyfailed with aSyntaxError(Python tried to parse base64 text as source), even though every doc and theColor.ktheader tell contributors to run exactly that command. Both files were introduced together in14e959f(an unrelated slider-fix PR).Verified the encoding relationship before changing anything:
diff <(base64 -d wcag_check.py) wcag_check_real.pywas byte-identical.Fix
wcag_check.pywith the actual plaintext script (its internal docstring already names itselfwcag_check.py).wcag_check_real.py.Color.ktcomment already namewcag_check.py, and a repo-wide grep forwcag_check_realnow returns nothing.No colour values,
THEMESdata,PAIRSlist, 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 failurespython3 wcag_check.py coral— exit 0python3 a11y_check.py— exit 0 (untouched)grep -ri wcag_check_real— no matchescheck_changelog_fragment.py'sAPP_CODE_PATTERNScovers*.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 ofmainas a single clean commit that applies only the runnable + de-duplication change. No conflicts; the reconciled palette values already onmainare preserved (the new plaintextwcag_check.pyis the decode ofmain's reconciled base64 file).🤖 Generated with Claude Code
https://claude.ai/code/session_01Hz3A1rUUrbhVHcRWgguUFD