Context
tests/contrast.spec.ts walks .tsx files under components/ and app/. lib/prose.ts is a .ts file under lib/, so the guard never sees it — and it is the single largest concentration of hardcoded colours left in the app.
PROSE_CLASSES drives both /methodology (which renders docs/ANCHOR_REPUTATION.md) and /terms. It hardcodes text-gray-600, text-blue-600, dark:text-blue-400, bg-gray-50, dark:bg-gray-900/60 — several of which the guard would reject outright if it could see them.
Two consequences: those routes are invisible to the accessibility guard, and they will not follow a palette change.
Requirements
- Convert
PROSE_CLASSES in lib/prose.ts to palette tokens
- Extend the guard's walker in
tests/contrast.spec.ts to include lib/**/*.ts — the file already has a "scanned a non-trivial number of files" self-check that will keep the walker honest
- Re-run against
/methodology and /terms in both themes
Notes
Follow-up to #749. Flagged there rather than fixed, because a token swap and a walker change under one closing keyword muddies which one caused a regression.
Context
tests/contrast.spec.tswalks.tsxfiles undercomponents/andapp/.lib/prose.tsis a.tsfile underlib/, so the guard never sees it — and it is the single largest concentration of hardcoded colours left in the app.PROSE_CLASSESdrives both/methodology(which rendersdocs/ANCHOR_REPUTATION.md) and/terms. It hardcodestext-gray-600,text-blue-600,dark:text-blue-400,bg-gray-50,dark:bg-gray-900/60— several of which the guard would reject outright if it could see them.Two consequences: those routes are invisible to the accessibility guard, and they will not follow a palette change.
Requirements
PROSE_CLASSESinlib/prose.tsto palette tokenstests/contrast.spec.tsto includelib/**/*.ts— the file already has a "scanned a non-trivial number of files" self-check that will keep the walker honest/methodologyand/termsin both themesNotes
Follow-up to #749. Flagged there rather than fixed, because a token swap and a walker change under one closing keyword muddies which one caused a regression.