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):
Headings, symbols, signatures, section names, magic words: #E4A400
Templates: #9C3A00
HTML tags, references, math: #56B4E9
Variables: #009E73
Preference
- 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
- Reported on https://meta.wikimedia.org/wiki/Talk:WMDE_Technical_Wishes/Improved_Color_Scheme_of_Syntax_Highlighting
- Related request T163533: Add different color themes of syntax highlighting
- Implementation on the test instance: T263416: Test instance: add accessibility preference and colorblind-friendly syntax highlighting
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):