phone-app/src/ui/theme/colors.ts and themes.ts both define platinum.ink3 — "dimmest ink (menu disabled)" — and nothing in src/ or app/ uses it:
$ grep -rn "ink3" phone-app/src phone-app/app --include=*.tsx --include=*.ts | grep -v theme/
phone-app/src/__tests__/theme-contrast.test.ts:... # only the contrast sweep
It came up while fixing #565. My first draft of theme-contrast.test.ts held it to the 3:1 large-text floor, which it fails in both themes — #7A8288 on #DDDDDD is 2.88:1, #7C8388 on #3E4044 is 2.70:1. I excluded it rather than darkening a colour, because changing the design to satisfy a floor invented for a token nothing draws would be backwards, and disabled text is exempt from AA anyway (WCAG 1.4.3). But that leaves a token in the palette that is neither used nor checked.
Ask: decide which it is, and make the tree say so.
- If disabled states should use it — wire it. There are real candidates: a disabled
Tappable, the greyed rows in the packs screen, a menu item that cannot be chosen. Then it needs a contrast policy: AA exempts disabled text, but 2.70:1 on the midnight face is close to invisible on a phone in daylight, and "exempt" is not the same as "good". Adding it to the sweep at whatever floor you argue for is part of the ask.
- If nothing should use it — delete it from both
ColorSet/PlatinumSet definitions and both theme objects, and drop the ink3 line from the ordering assertion in theme-contrast.test.ts. ink2 is then the dimmest ink and that assertion becomes a two-way comparison.
Either is a fine answer; the current state — defined, unused, unchecked, and failing a floor it is exempt from — is the only one that is not.
Small and self-contained. phone-app/src/ui/theme/ plus one test file.
PRs welcome.
phone-app/src/ui/theme/colors.tsandthemes.tsboth defineplatinum.ink3— "dimmest ink (menu disabled)" — and nothing insrc/orapp/uses it:It came up while fixing #565. My first draft of
theme-contrast.test.tsheld it to the 3:1 large-text floor, which it fails in both themes —#7A8288on#DDDDDDis 2.88:1,#7C8388on#3E4044is 2.70:1. I excluded it rather than darkening a colour, because changing the design to satisfy a floor invented for a token nothing draws would be backwards, and disabled text is exempt from AA anyway (WCAG 1.4.3). But that leaves a token in the palette that is neither used nor checked.Ask: decide which it is, and make the tree say so.
Tappable, the greyed rows in the packs screen, a menu item that cannot be chosen. Then it needs a contrast policy: AA exempts disabled text, but 2.70:1 on the midnight face is close to invisible on a phone in daylight, and "exempt" is not the same as "good". Adding it to the sweep at whatever floor you argue for is part of the ask.ColorSet/PlatinumSetdefinitions and both theme objects, and drop theink3line from the ordering assertion intheme-contrast.test.ts.ink2is then the dimmest ink and that assertion becomes a two-way comparison.Either is a fine answer; the current state — defined, unused, unchecked, and failing a floor it is exempt from — is the only one that is not.
Small and self-contained.
phone-app/src/ui/theme/plus one test file.PRs welcome.