Nothing stops a text colour that fails the contrast floor from being used again #65

Open
opened 2026-09-21 07:18:19 +00:00 by cgalo5758 · 0 comments
Owner

What a contributor runs into

Bootstrap's state text utilities (text-warning, text-info, text-success) are the obvious way to colour a word by the state it names, and on the page's own ground they are unreadable at small sizes: the warning colour measures around a third of the floor that small text has to clear for the AA level. Only the -emphasis variants clear it, and they are one word away. Nothing refuses the wrong one, so it is typed, reviewed, and shipped.

Why it costs

The rule lives only in the memory of whoever reviews the template, and the audit cannot catch it because a state utility usually colours a state the demo data does not produce. Two such colours were fixed by hand; the classes that produced them are still the shortest thing to type.

Where

internal/lint/anatomy.go, beside the other template rules; docs/design-system.md, the approved palette.

Done when

The lint refuses the plain state utilities as a text colour outside badges and names the -emphasis variant in its message, the design system states the rule, and the two colours that sit just over the floor (danger and success) are recorded as passing so the rule does not chase them.

Migrated from status/issues.md at b7a0e15

## What a contributor runs into Bootstrap's state text utilities (`text-warning`, `text-info`, `text-success`) are the obvious way to colour a word by the state it names, and on the page's own ground they are unreadable at small sizes: the warning colour measures around a third of the floor that small text has to clear for the AA level. Only the `-emphasis` variants clear it, and they are one word away. Nothing refuses the wrong one, so it is typed, reviewed, and shipped. ## Why it costs The rule lives only in the memory of whoever reviews the template, and the audit cannot catch it because a state utility usually colours a state the demo data does not produce. Two such colours were fixed by hand; the classes that produced them are still the shortest thing to type. ## Where [`internal/lint/anatomy.go`](https://git.coopcloud.tech/wiki-cafe/member-console/src/commit/b7a0e15/internal/lint/anatomy.go), beside the other template rules; [`docs/design-system.md`](https://git.coopcloud.tech/wiki-cafe/member-console/src/commit/b7a0e15/docs/design-system.md), the approved palette. ## Done when The lint refuses the plain state utilities as a text colour outside badges and names the `-emphasis` variant in its message, the design system states the rule, and the two colours that sit just over the floor (danger and success) are recorded as passing so the rule does not chase them. Migrated from status/issues.md at b7a0e15
cgalo5758 added the
kind
debt
area/operator-uiarea/testingaccessibility
labels 2026-09-21 07:18:19 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#65