Page MenuHomePhabricator

Update CodeMirror syntax highlighting color scheme to meet accessibility standards
Closed, ResolvedPublic2 Estimated Story Points

Description

Background
This ticket is only to update the colors assigned to each category of wikitext content. The new colors meet WCAG 1.4.3 AA. It also brings the syntax highlighter in-line with the accessibility guidelines committed to by Wikimedia. This helps not only people with low-vision, but also people looking at screens with glare.

The colors assigned to each category are not being changed. Most colors simply get darker so they have more contrast with a white background. The red got lighter because the orange had to get very dark to meet contrast requirements and they were looking too similar to each other. Purple and the black remain the same.

Requirements

  • Implement this change behind a feature flag, deployment TBD
  • Update syntax highlighting rules to reflect the updated colors below
  • Do not adjust or remove background highlighting rules
  • Do not adjust or remove bolding or underlining rules

Color change overview

Syntax Color Scheme - en FINAL.png (1×1 px, 232 KB)

Hex values
NOTE: these colors are different from the color scheme implemented on the test instance T263410: Test instance: Update CodeMirror color scheme. Do not change background highlighting, bolding or underlining rules.

Wikitext typesColorCurrentUpdated
Main body textBlack#010101No change
CommentsGrey#84A0A0Base30 (#72777D)
Internal Links, External Links, Categories, ImagesDark blue#3366CC#000AAA
Headings, Symbols * : ‘ #, Signatures, Leading space, #Section name, Magic wordsLight blue#0088FF#0076DD
References, HTML tags and entities, MathGreen#0088FFGreen30 (#14866D)
TablesPink#EE00EE#DD0088
TemplatesPurple#8800CCNo change
VariablesOrange#FF5500Yellow30 (#AC6600)
Parser functionsRed#AA1111Red50 (#DD3333)

Project pages: meta, dewiki

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Lena_WMDE renamed this task from DRAFT: Update CodeMirror syntax highlighting color scheme to meet accessibility standards to Update CodeMirror syntax highlighting color scheme to meet accessibility standards.Jan 13 2021, 2:18 PM
Lena_WMDE set the point value for this task to 3.Jan 13 2021, 2:21 PM
Lena_WMDE changed the point value for this task from 3 to 2.Mar 3 2021, 2:28 PM

Change 668452 had a related patch set uploaded (by Andrew-WMDE; owner: Andrew-WMDE):
[mediawiki/extensions/CodeMirror@master] Update color scheme to meet accessibility standards

https://gerrit.wikimedia.org/r/668452

Change 668452 merged by jenkins-bot:
[mediawiki/extensions/CodeMirror@master] Update color scheme to meet accessibility standards

https://gerrit.wikimedia.org/r/668452

Change 670452 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[operations/mediawiki-config@master] Enable CodeMirror accessibility color schema on Beta

https://gerrit.wikimedia.org/r/670452

Change 670452 merged by jenkins-bot:
[operations/mediawiki-config@master] Enable CodeMirror accessibility color schema on Beta

https://gerrit.wikimedia.org/r/670452

@ECohen_WMDE and I reviewed on the beta cluster and both think the implementation looks good.