Repository navigation
v0.5.95
Upgrading
- Run
kit:update plan|applyforcore(re-pinnedsha256:abe29379…903c→sha256:1cffa6e7…88fa) andnotes(sha256:d373d438…f1b2→sha256:1a0455e7…551b):css/kit.cssadds the--success-text,--warning-textand--info-texttokens,Kit/Form/FormActions.vueshows "Saved" intext-success-text,Kit/Feedback/alertVariants.tsgives a pale Alert the theme's foreground for its text and a*-texttoken for its icon, and the Notes page'scolours.tsgives a coloured note the theme's foreground. No kit stub colours text with a raw palette colour any more. - A host with its own theme (not importing
kit.css) must define--success-text,--warning-textand--info-textfor light and dark; the kit's AA values are a starting point:hsl(142 76% 26%),hsl(26 90% 33%)andhsl(201 90% 32%)light,hsl(142 69% 58%),hsl(43 96% 56%)andhsl(199 89% 64%)dark. Until it does, the kit's theme host step reads unmet. A host theme's value wins over the kit's, as for the other tokens.
Fixed
- FormActions' "Saved" meets WCAG AA. It was
text-green-600, about 3.3:1 on a white card (AA is 4.5:1), so axe'scolor-contrastfailed on every FormCard just after a save. The new--success-texttoken, with--warning-textand--info-textbeside it, is status text on a surface, as--destructive-textis:hsl(142 76% 26%)light (5.80:1 on background, card and popover, 5.32:1 on accent and muted) andhsl(142 69% 58%)dark (11.36:1, 8.68:1 on accent, 8.35:1 on muted); warning is 6.04:1 and 11.70:1, info 6.06:1 and 9.71:1, and at least 5.32:1 light and 7.13:1 dark on accent and muted. A pale Alert's icon takes these tokens (and--destructive-textfor danger) instead of raw palette colours, and its text, like a coloured note's, takes the theme's foreground.tests/js/semantic-text.test.mjscomputes the ratios fromkit.cssand refuses a raw palette text colour (text-green-600,dark:text-sky-300) in any kit resource, and the browser job's?form-savedpage runs axe'scolor-contrastover a saved FormCard and the pale Alerts, light and dark.
What's Changed
- Semantic status text tokens: FormActions' Saved meets AA (0.5.x) by @jaspertey in #442
Full Changelog: v0.5.94...v0.5.95