Skip to content

[CHORE] [UI] Tokenize lib/prose.ts and extend the contrast guard to lib/**/*.ts #968

Description

@ezedike-evan

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

  1. Convert PROSE_CLASSES in lib/prose.ts to palette tokens
  2. 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
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreBuild, tooling, deps, repo meta. Not a user-visible change.difficulty/good-first-issue< 2 hours, self-contained, clear acceptance criteria.epic/uiProduct surface — widget, dashboard, rate table.module/uicomponents/* + app/(ui)/* — React components and pages.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions