Bug description
Grey secondary text at 13–14px falls under the 4.5:1 required by WCAG 2.1 SC 1.4.3 (Level AA) in both themes. None of it is large-scale text, so the 3:1 allowance does not apply.
Measured with axe-core against the resolved computed colours:
| Ratio |
Element |
Foreground |
Background |
Size |
Where |
| 4.24:1 |
"Check All" |
#71717b |
#f0f0f2 |
13px |
/cp/roles/create |
| 3.48:1 |
"Pro" badge |
#ff269e |
#ffffff |
14px bold |
/cp/utilities/licensing |
| 3.67:1 |
tab label |
#71717b |
#18181b |
14px |
dark theme |
| 3.84:1 |
"1–3 of 3" pagination |
#71717b |
#131315 |
14px |
dark theme |
Required: 4.50:1.
Three of the four are the same token — grey-500 (#71717b) — used for secondary text against both the light panel and the dark chrome. It clears 3:1 everywhere but never reaches 4.5:1.
The fourth is the brand pink used as text on the licensing screen.
How to reproduce
composer create-project statamic/statamic, log in
- Visit
/cp/roles/create in the light theme and check the "Check All" label
- Visit
/cp/utilities/licensing and check the pink "Pro" label
- Switch to the dark theme and check a tab label and the listing pagination count
Or run axe-core with the color-contrast rule on those screens.
Suggested fix
- Move secondary text from grey-500 to grey-600 in light and grey-400 in dark.
#52525c on #f0f0f2 gives 7.4:1; #9f9fa9 on #131315 gives 7.9:1.
- Give the pink a darker variant for text use and keep the current brand pink for fills and borders, where 3:1 is the bar.
Both are token changes rather than component changes, which is why I've filed this rather than opened a PR — the exact replacement values are a design call.
Note
Non-text contrast is a separate problem, reported in #15397. Fixing the text tokens here won't address the control borders there.
Bug description
Grey secondary text at 13–14px falls under the 4.5:1 required by WCAG 2.1 SC 1.4.3 (Level AA) in both themes. None of it is large-scale text, so the 3:1 allowance does not apply.
Measured with axe-core against the resolved computed colours:
#71717b#f0f0f2/cp/roles/create#ff269e#ffffff/cp/utilities/licensing#71717b#18181b#71717b#131315Required: 4.50:1.
Three of the four are the same token — grey-500 (
#71717b) — used for secondary text against both the light panel and the dark chrome. It clears 3:1 everywhere but never reaches 4.5:1.The fourth is the brand pink used as text on the licensing screen.
How to reproduce
composer create-project statamic/statamic, log in/cp/roles/createin the light theme and check the "Check All" label/cp/utilities/licensingand check the pink "Pro" labelOr run axe-core with the
color-contrastrule on those screens.Suggested fix
#52525con#f0f0f2gives 7.4:1;#9f9fa9on#131315gives 7.9:1.Both are token changes rather than component changes, which is why I've filed this rather than opened a PR — the exact replacement values are a design call.
Note
Non-text contrast is a separate problem, reported in #15397. Fixing the text tokens here won't address the control borders there.