Skip to content

platinum.ink3 is defined in both themes and rendered by nothing #579

Description

@LetsGetToWorkBro

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions