Page MenuHomePhabricator

Color improvements: alternative/optional color scheme for colorblindness
Closed, ResolvedPublic3 Estimated Story Points

Description

Requirements

  • Implement behind a new feature flag to coordinate with existing announcements
  • Add new color-blind friendly scheme to CodeMirror
  • Create a new section in Editing preferences titled 'Accessibility' and add a new preference to turn on/off color scheme

Specifications

Highlighting

  • No background highlight/ background color for any type of content
  • Bolding and underlining remains unchanged
  • Four colors change (outlined in black in the image):

Colorblind-friendly (high contrast between each other).png (1×1 px, 36 KB)

Headings, symbols, signatures, section names, magic words: #E4A400
Templates: #9C3A00
HTML tags, references, math: #56B4E9
Variables: #009E73

Preference

New preference.png (753×940 px, 100 KB)

  • Add new section titled: "Accessibility" to the Editing tab of preferences
  • Add a new setting with description: "Enable colorblind-friendly scheme for syntax highlighting when editing wikitext" and sub-description (match styling of "Enable editing toolbar" preference): "If you use a gadget for syntax highlighting, this preference will not work."

Background

The more accessible colors introduced in T271895 increase the contrast between the text and the background. For this many colors had to get darker, which means that the contrast between the colors actually decreased. This new scheme is introduced to emphasize contrast between colors, especially for elements that often show up next to each other in wikitext (article and templates). It has been tested for multiple types of color-blindness and is inspired by https://jfly.uni-koeln.de/color/#pallet but adapted for our context.

Example test

Protonopia (left is current colors, right is new colors added in this ticket):

Protonopia.png (529×753 px, 175 KB)

Event Timeline

ECohen_WMDE set the point value for this task to 3.

No background highlight/ background color for any type of content

Do we still want to keep the "box shadow" effect for bracket matching? Otherwise this would de-facto disable bracket matching in the colorblind scheme.

ECohen_WMDE subscribed.

@WMDE-Fisch Good catch! The bracket matching should remain the same. That is the one exception to this requirement. By "any type of content" I meant the various types of wikitext like templates, links, etc.

Change 778505 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[operations/mediawiki-config@master] [beta] Enable colorblind-friendly color scheme on beta cluster

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

Change 778505 merged by jenkins-bot:

[operations/mediawiki-config@master] [beta] Enable colorblind-friendly color scheme on beta cluster

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