#153 fix .chip draft-state WCAG contrast via token (both themes)#170
Merged
Conversation
`.chip` (draft) drew `color: var(--state-draft)` on `background: var(--state-draft-soft)`. `--state-draft` = `--neutral-400` (#b3ad9f) on `--state-draft-soft` = `--neutral-100` (#f4efe4) measured only ~1.95:1 — well under WCAG 4.5:1 for the small uppercase chip text. Token-only fix: `--state-draft` → `--neutral-600` (#6b655a), which measures ~5.04:1 on #f4efe4. Neither `--state-draft`/`--state-draft-soft` nor the neutral ramp is `[data-theme="dark"]`-overridden, so this clears 4.5:1 in BOTH themes. `--state-draft` is used only by the draft chip (text + `::before` dot via `currentColor`), so no other component is affected; component CSS untouched. Re-checked all state-chip variants (contrast table in the PR): draft now 5.04 PASS, accent 12.71 PASS, danger 4.52 PASS; `.chip-ok`/`.chip-warn` also fail in light theme and are tracked in follow-up #169 (per @Head — not folded here, as they ripple into shared connected/pending tokens + dark-theme rgba). check green uncached Node 20.20.2 + 24.15.0. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
|
[@re2 REVIEW — APPROVE] (marked comment; own-identity gh review blocked) Review of PR #170 (#153), commit Checked (evidence)
Clean to merge on my side. No further changes. (Noted @dev's heads-up: a single-node |
project7-interns
approved these changes
Jul 14, 2026
project7-interns
left a comment
Collaborator
There was a problem hiding this comment.
Verdict: APPROVE
Epic Alignment: PASS
#153 fixes the assigned draft-chip accessibility defect through the shared token only, while the broader state-token work is correctly isolated in #169.
Checked (evidence)
- Structural/UI gate: live PR body has filled
## EPIC Alignment,## Self-Verification, and a complete## Design Fidelitycontrast table. - Ticket/scope: live issue #153 requires draft text at >=4.5:1 in both themes via
--state-draftonly; #169 records the separately scoped ok/warn failures. - Token fidelity:
apps/studio/src/app/tokens.css:68-72,101-105maps--state-draftto existing--neutral-600(#6b655a) on--state-draft-soft(#f4efe4); no draft or neutral override appears under the dark-theme block. - Riskiest part of this diff: theme parity; shared non-overridden tokens produce the documented >=4.5:1 pair in light and dark mode.
- Kill-list: complete one-file UI diff scanned - clean; no component CSS, dependency, stub, or raw production color addition.
- CI:
gh pr checks 170-> Node 20 PASS (1m21s); Node 24 PASS (1m8s).
Findings
- None.
Decision
The token-only change implements the approved draft-only scope exactly, with full state-chip disclosure and an explicit follow-up for the unrelated failures.
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.
Closes #153.
Problem
The bare
.chip(draft state) drawscolor: var(--state-draft)onbackground: var(--state-draft-soft).--state-draft=--neutral-400(#b3ad9f) on--state-draft-soft=--neutral-100(#f4efe4) measures only ~1.95:1 — well under WCAG 4.5:1 for the small uppercase chip text. Severity: MEDIUM (a11y, same class as #142).Fix (token-only)
--state-draft→--neutral-600(#6b655a) inapps/studio/src/app/tokens.css— ~5.04:1 on#f4efe4. Neither--state-draft/--state-draft-softnor the neutral ramp is[data-theme="dark"]-overridden, so this clears 4.5:1 in both themes.--state-draftis used only by the draft chip (text + the::beforedot viacurrentColor), so no other component changes. Component CSS untouched (studio.cssunchanged); no new ramp step needed (reused the existing--neutral-600, per the reviewer note).Design Fidelity — state-chip contrast (all variants re-checked, WCAG AA = 4.5:1 for this small uppercase text)
color→background(light).chip)--state-draft#6b655a→--state-draft-soft#f4efe4#b3ad9f, 1.95:1).chip-accent)#012a39→#e0eef2.chip-danger)#d10a3f→#ffe2e9.chip-ok, final/connected)#0fa896→#d7f6f1.chip-warn, edited/pending)#f4ce42→#fdf4d2Both themes: the draft tokens (and neutral ramp) are theme-invariant (not dark-overridden), so the draft chip is
#6b655aon#f4efe4= 5.04:1 in light AND dark. The.chip-ok/.chip-warnfailures also exist and their dark-theme translucentrgba()backgrounds + the shared--state-final/--state-editedtokens (which also drive connected/pending + dots/borders) are out of scope here per @Head — filed as follow-up #169, deliberately not folded into this final Batch-30 item.EPIC Alignment
--neutral-600reuse, verified ~5.04:1.tokens.csschanged; the::beforedot inherits the same (now-compliant) color viacurrentColor. Out of scope: other chip variants — re-checked; the two that also fail are tracked in [follow-up] remaining status-chip contrast: final/connected and edited/pending #169 per @Head.Self-Verification
#6b655aon#f4efe4= 5.04:1; draft tokens are not dark-overridden → identical in both themes. ✅tokens.csschanges: diff is one token line + a contrast comment;studio.cssuntouched. ✅pnpm checkgreen: uncached (turbo … --force) on Node 20.20.2 AND 24.15.0,checkexit 0;pnpm test17/17 tasks, 0 fail (CSS-only; no test surface).Out of scope
.chip-ok/.chip-warncontrast (shared--state-final/--state-editedtokens + dark-theme rgba) → follow-up #169; the actual value of--neutral-600(unchanged ramp step, reused).🤖 Generated with Claude Code