Repository navigation
feat(ui): the text tokens reach 4.5:1 on every surface (0.7.0) - #62
Merged
Merged
Conversation
--text-tertiary was 2.30:1 to 2.57:1 in the light and 2.75:1 to 3.29:1 in the dark, below the 4.5:1 that WCAG 2.x asks of body text. It now reaches 4.67:1 or more on --bg-window, --bg-sidebar, --bg-toolbar and --bg-banner, light and dark: - --text-secondary: #6e6e73 -> #5b5b60 (light), #a1a1a6 -> #aaaaaf (dark) - --text-tertiary: #a1a1a6 -> #6c6c71 (light), #6e6e73 -> #95959a (dark) The light secondary was 4.54:1 on the sidebar, which left no room for a tertiary at 4.5:1 below it, so it moves too. Both schemes keep the same step, and primary > secondary > tertiary holds on every surface. ui/test/contrast.test.ts computes each ratio from tokens.css and fails under 4.5:1 or out of order. ADR-0021 records the decision; the spec, the README and the changelog carry the values. A token value change is a minor before 1.0: @frostyard/lodge-ui 0.7.0.
ADR-0021 listed the shell among the apps that take the new greys when they bump to ui/v0.7.0. The shell links ../ui, so it takes them at lodge's next build. AGENTS.md now says so where it lists who bumps after a library tag, and .memory/corrections.jsonl records the correction.
bketelsen
approved these changes
Nov 11, 2026
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.
Summary
@frostyard/lodge-ui0.7.0: the 3 text tokens reach the 4.5:1 contrast that WCAG 2.x asks of body text, on each of the 4 surfaces (--bg-window,--bg-sidebar,--bg-toolbar,--bg-banner), in the light and in both dark blocks. Decision: ADR-0021.--text-primary#1d1d1f(same)#f5f5f7(same)--text-secondary#6e6e73→#5b5b60#a1a1a6→#aaaaaf--text-tertiary#a1a1a6→#6c6c71#6e6e73→#95959aui/test/contrast.test.tsreadstokens.cssand computes each ratio, with the light block and both dark blocks read separately. It fails under 4.5:1, naming the scheme, the token, the surface and the ratio. It also fails when the 3 tokens are out of order, and it refuses any value that is not#rrggbb.docs/specs/ui-package.md,ui/README.md,ui/CHANGELOG.md(0.7.0),ui/package.json0.7.0, and back-links in the overview and the roadmap.ui/test/fixtures/tokens.tsrecords the 2 tokens as an exception to frostmail's values, as it does for the accent.--badge-textalso stays under 4.5:1 (4.04:1 on--badge-bgin the light, 4.41:1 in the dark). It is not one of the 3 text tokens, and ADR-0021 records it for a later change. No tag:ui/v0.7.0comes after the merge. Each app takes the new values when it bumps its pin.Risk tier
Risk tier: 2: a visible look change (token values) in a shared package. No path in
.github/risk-paths.jsonmatches.Docs housekeeping
TEMPLATE.md(ADR-0021)docs/README.mdVerification
make checkgreen (host)make ui-checkgreen (nsl machinelodge): 10 files, 86 tests;contrast.test.ts16 tests. Biome prints 3 earlier warnings insrc/react/Menu.tsx(unused suppressions), none from this change.ui/v0.6.0and take 0.7.0 in their own bump PRs; the shell links../ui, and CI's shell check passes at4b12c81.ui/src/tokens.css,pnpm exec vitest run test/contrast.test.ts(nsl) fails 3 tests:--text-tertiaryin the light block (2.57:1 on--bg-window), the media dark block (3.29:1) and the data-theme dark block (3.29:1). 13 tests pass.openai/gpt-6.1-sol) of head17ea75f: 1 blocking point (ADR-0021 listed the shell among the apps that bump to the tag; the shell links../ui). Fixed in the next commit, with its guard: anAGENTS.mdrule and 1 line in.memory/corrections.jsonl.openai/gpt-6.1-sol) of head4b12c81: Ready, blocking: none. CI green on all 9 jobs at4b12c81.