Fix WCAG AA color contrast on important/seealso/tip admonition titles - #332
Merged
Merged
Conversation
4 tasks
Darken $success color from #a456c9 to color.adjust(#a456c9, $lightness: -3%) (compiles to #9e4ac5), improving contrast ratio with white text from 4.41:1 to 4.95:1, meeting WCAG 2 AA minimum of 4.5:1. Fixes #326 - affects .important, .seealso, .tip admonition titles in both light and dark mode (both use $success as the title background color).
Copilot
AI
changed the title
[WIP] Fix accessibility issue: Improve color contrast on admonitions
Fix WCAG AA color contrast on important/seealso/tip admonition titles
Jul 3, 2026
Member
|
@copilot looking good, pls rebase and add a release note entry |
Contributor
Author
Done — rebased onto main and added the CHANGELOG entry under |
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.
The
.important,.seealso, and.tipadmonition title backgrounds used$success: #a456c9— a purple that yields only 4.41:1 contrast with white text, just below the WCAG 2 AA threshold of 4.5:1.Change
Darken
$successby 3% lightness insass/_variables.scss:This brings the contrast ratio to 4.95:1 with white text. The fix applies to both light and dark mode — the admonition title background uses
$successdirectly in both (only the outer container is overridden by$darkmode-success). All other components using$success(version badges, bignums) benefit equally.