Skip to content

Code Highlight - Address a11y contrast issues

Zack Cuddy requested to merge 346975-update-code-highlight-color into master

What does this MR do and why?

Closes #346975 (closed)
Found when working on !75279 (merged)

There are some A11y concerns on the line numbers when highlighting lines of code on MR diffs. The contrast of the foreground to background are not AA compliant.

This is/was a very minute issue but was further exposed when the scss mixin was used as part of !75279 (merged) with SVG icons.

Screenshots or screen recordings

Theme Before After
White White_Before White_After
Dark Dark_Before Dark_After
Solar Light Solar_Light_Before Solar_Light_After
Solar Dark Solar_Dark_Before Solar_Dark_After
Monakai Mono_Before Mono_After
None None_Before None_After
Dark Mode w/ Dark Dark_Mode_Dark_Before Dark_Mode_Dark_After

How to set up and validate locally

  1. Fetch this branch
  2. Go to a MR with code changes
  3. Go to the Changes Tab
  4. Hover over a line and notice the CSS changes to the line numbers
  5. Repeat for each syntax theme (set in user preferences)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #346975 (closed)

Edited by Zack Cuddy

Merge request reports

Loading