Skip to content

Improve code block contrast with GitHub Light High Contrast theme#1137

Merged
ksen0 merged 10 commits intoprocessing:mainfrom
coseeian:contrast-fix
Feb 4, 2026
Merged

Improve code block contrast with GitHub Light High Contrast theme#1137
ksen0 merged 10 commits intoprocessing:mainfrom
coseeian:contrast-fix

Conversation

@coseeian
Copy link
Copy Markdown
Collaborator

@coseeian coseeian commented Feb 3, 2026

Resolve #886

Use high-contrast theme in syntax-highlighted code blocks across the website to provide better text-to-background contrast ratio.

Since @eslteacher902010 has done preliminary work on this issue, I've included @eslteacher902010's commits in this PR to ensure they receive proper attribution in the Git history, though the final implementation has evolved.

Summary

  • Upgrade Shiki from v1.x to v3.22.0
  • Switch syntax highlighting theme from github-light to github-light-high-contrast.
  • Apply high-contrast theme to both astro's markdown code blocks (used in places like CodeBlockWrapper) and AnnotatedCode components

Demo

Before: Wave tool flags that there are color contrast issues in code blocks in /tutorials/setting-up-your-environment/ page.

Screenshot 2026-02-03 at 16 13 42

After: Wave tool finds 0 contrast issue in /tutorials/setting-up-your-environment/ page.

Screenshot 2026-02-03 at 16 15 56

@coseeian coseeian added the Accessibility: High Severity Web accessibility issues that have a significant negative impact on users label Feb 3, 2026
@coseeian coseeian changed the title Contrast fix Improve code block contrast with GitHub Light High Contrast theme Feb 3, 2026
@ksen0
Copy link
Copy Markdown
Member

ksen0 commented Feb 3, 2026

Thanks so much for moving this forward!

@ksen0 ksen0 mentioned this pull request Feb 3, 2026
@coseeian coseeian marked this pull request as ready for review February 4, 2026 00:55
@coseeian
Copy link
Copy Markdown
Collaborator Author

coseeian commented Feb 4, 2026

The PR is ready for review. Take your time. Not urgent. Thanks!

@ksen0 ksen0 merged commit db4a56a into processing:main Feb 4, 2026
4 checks passed
@coseeian coseeian deleted the contrast-fix branch February 5, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accessibility: High Severity Web accessibility issues that have a significant negative impact on users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Content] Insufficient text-to-background contrast

3 participants