Syntax highlighting: Make WCAG 2.1 compliant
Created by: umpox
Description
This PR introduces feature-flagged changes to our syntax highlighting that make it WCAG 2.1 compliant. This is still experimental, as we want to ensure that we do not regress on general readability whilst making these changes.
This should result in significantly less (or 0) color contrast violations in our syntax highlighting in both light and dark mode.
Introduction plan
Week 1/2: Enable site wide for the Sourcegraph organization on Sourcegraph.com. Post in #dev-chat, ask for feedback and address. Week 3: If no outstanding feedback, enable for everyone (remove the feature flag)
Comparisons
PAGE | BEFORE | AFTER |
---|---|---|
Blob view | 269 violations | 0 violations |
Search results | 125 violations | 0 violations |
Diff view | 1708 violations (entire diff) | 0 violations (entire diff) |
Test plan
Tested locally. Changes are feature flagged so easy to revert if needed.
App preview:
Check out the client app preview documentation to learn more.