Repository navigation
Fix: give the save toast a coloured fill that meets WCAG AA - #6
Merged
Merged
Conversation
Success and failure were carried by a 3px bar on one edge of an otherwise neutral toast. The state now fills the whole toast, tinted 30% of the accent into the page colour so near-white text measures 8.13 on success and 10.33 on failure, where the raw accent behind that text measures 2.02 and 3.43 and fails 1.4.3. The accent stays at full strength on the border, which carries the 3.0 of 1.4.11 on its own at 8.42 and 4.96 against the page. contrast.test.mjs now reads the recipe out of the stylesheet and computes both figures in the default and increased-contrast palettes, so a colour change re-measures instead of drifting from a comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
border-inline-start: 3px solidaccent with a filled background:color-mix(in srgb, var(--gn) 30%, var(--bg-outer))for success and the same withvar(--rd)for failure, with the raw accent onborder-color.prefers-contrast: morethe palette swaps to--sy-green-hi/--sy-red-hiand every figure rises. The raw accent as a fill was 2.02 and 3.43 behind the same text and would have failed.ui/test/contrast.test.mjsto parse the mix out ofadmin.cssand compute both thresholds in both palettes, rather than recording numbers in a comment.role="status" aria-live="polite"on the element is untouched.Testing
All green. Added 3 tests and rewrote 1; mutation-checked by reverting the fill to the raw accent and by weakening the border, each of which fails the new assertions.
Checklist