fix(tokens): update code-color token to meet WCAG AA contrast#4269
Open
e0d wants to merge 1 commit intorelease-23.xfrom
Open
fix(tokens): update code-color token to meet WCAG AA contrast#4269e0d wants to merge 1 commit intorelease-23.xfrom
e0d wants to merge 1 commit intorelease-23.xfrom
Conversation
The light theme code-color token (#E83E8C) failed WCAG 1.4.3 contrast
requirements, achieving 3.81:1 on white and 3.56:1 on off-white
backgrounds — both below the 4.5:1 minimum for normal-weight text.
Updated color.code.base to reference {color.brand.500} rather than a
raw hex value. This resolves the contrast failure (#9D0054, ~9:1 on
white) and aligns with the established pattern of component tokens
referencing palette tokens (e.g. success → green, info → teal). It
also ensures that theme overrides to brand-500 automatically propagate
to inline code text color.
Compiled output: --pgn-color-code-base: var(--pgn-color-brand-500)
Identified via WCAG 2.2 AA audit using static source analysis and
automated page scanning (OpenEdX_ActionRowComp.pdf, 01 May 26).
AI assistance: Code change, contrast analysis, and token architecture
review developed with Claude (claude-sonnet-4-6). Conversation
informed the audit findings, color selection, and token pipeline
tracing.
Co-authored-by: Claude <claude@anthropic.com>
✅ Deploy Preview for paragon-openedx-v23 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-23.x #4269 +/- ##
=============================================
Coverage 94.40% 94.40%
=============================================
Files 242 242
Lines 4309 4309
Branches 1020 1020
=============================================
Hits 4068 4068
Misses 237 237
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
PKulkoRaccoonGang
approved these changes
May 6, 2026
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 light theme code-color token (#E83E8C) failed WCAG 1.4.3 contrast requirements, achieving 3.81:1 on white and 3.56:1 on off-white backgrounds — both below the 4.5:1 minimum for normal-weight text.
Updated color.code.base to reference {color.brand.500} rather than a raw hex value. This resolves the contrast failure (#9D0054, ~9:1 on white) and aligns with the established pattern of component tokens referencing palette tokens (e.g. success → green, info → teal). It also ensures that theme overrides to brand-500 automatically propagate to inline code text color.
Compiled output: --pgn-color-code-base: var(--pgn-color-brand-500)
Identified via WCAG 2.2 AA audit using static source analysis and automated page scanning (OpenEdX_ActionRowComp.pdf, 01 May 26).
AI assistance: Code change, contrast analysis, and token architecture review developed with Claude (claude-sonnet-4-6). Conversation informed the audit findings, color selection, and token pipeline tracing.
Description
Include a description of your changes here, along with a link to any relevant Jira tickets and/or Github issues.
Deploy Preview
Include a direct link to your changes in this PR's deploy preview here (e.g., a specific component page).
Merge Checklist
exampleapp?Post-merge Checklist