Page MenuHomePhabricator

Edit link brackets have insufficient contrast in dark mode
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?: Firefox says these brackets are at ~2.5 contrast.

image.png (382×1 px, 59 KB)

What should have happened instead?: Bump the contrast to at least ?

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

The styles seem to be coming from VE?

/*!
 * VisualEditor MediaWiki DesktopArticleTarget noscript styles
 *
 * @copyright See AUTHORS.txt
 * @license The MIT License (MIT); see LICENSE.txt
 */
/**
 * Hide VE edit tab and section edit things for noscript users.
 * For script users they're always visible unless and until ve-not-available is added.
 */
/* stylelint-disable selector-max-id */
.client-nojs #ca-ve-edit,
.ve-not-available #ca-ve-edit,
.client-nojs .mw-editsection-divider,
.ve-not-available .mw-editsection-divider,
.client-nojs .mw-editsection-visualeditor,
.ve-not-available .mw-editsection-visualeditor {
  display: none;
}
/* stylelint-enable selector-max-id */
/* For script users, expand brackets by default, unless and until ve-not-available is added */
.client-js .mw-content-ltr .mw-editsection-bracket:first-of-type,
.client-js .mw-content-rtl .mw-editsection-bracket:not( :first-of-type ) {
  /* @noflip */
  margin-right: 0.25em;
  /* @noflip */
  color: #54595d;
}
.client-js .mw-content-rtl .mw-editsection-bracket:first-of-type,
.client-js .mw-content-ltr .mw-editsection-bracket:not( :first-of-type ) {
  /* @noflip */
  margin-left: 0.25em;
  /* @noflip */
  color: #54595d;
}

Derived Requirement

Ensure that edit link brackets have sufficient contrast in dark mode, meeting WCAG AA standards.

BDD

Feature: Edit Link Brackets Contrast in Dark Mode

  Scenario: Ensure sufficient contrast for edit link brackets in dark mode
    Given the user has enabled dark mode
    When the user views a page with edit link brackets
    Then the edit link brackets should have sufficient contrast
    And the contrast should meet WCAG AA standards

Test Steps

Test Case 1: Ensure Sufficient Contrast for Edit Link Brackets in Dark Mode

  1. Enable dark mode.
  2. Navigate to any old page, such as this one.
  3. Use a contrast checker tool to measure the contrast of the edit link brackets.
  4. AC1: Confirm that the edit link brackets have sufficient contrast and meet WCAG AA standards.

QA Results - Beta

ACStatusDetails
1T365089#9823948

QA Results - PROD

ACStatusDetails
1T365089#9844090

Event Timeline

Change #1032118 had a related patch set uploaded (by Sohom Datta; author: Sohom Datta):

[mediawiki/extensions/VisualEditor@master] Use codex tokens for .mw-editsection-bracket

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

Jdlrobson triaged this task as Low priority.
Jdlrobson moved this task from Backlog to QA on the Web-Team-Backlog (FY2023-24 Q4 Sprint 3) board.

Change #1032118 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Use codex tokens for .mw-editsection-bracket

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

... I'm still more confused than not that VisualEditor is loading color data rather than relying on native skin CSS...

Given the user has enabled dark mode on the mobile site

This issue was experience in Vector 22.

Edtadros updated the task description. (Show Details)
Edtadros updated the task description. (Show Details)
Edtadros subscribed.

Test Result - Beta

Status: ✅ PASS
Environment: Beta
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Ensure Sufficient Contrast for Edit Link Brackets in Dark Mode

  1. Enable dark mode.
  2. Navigate to any old page, such as this one.
  3. Use a contrast checker tool to measure the contrast of the edit link brackets.
  4. AC1: Confirm that the edit link brackets have sufficient contrast and meet WCAG AA standards.

screenshot 371.png (966×1 px, 436 KB)

Looking at @Edtadros's screenshot, the divider in [ edit | edit source appears to be of insufficient contrast, is this a seperate bug or a something we missed ?

Test Result - PROD

Status: ✅ PASS
Environment: PROD
OS: macOS Sonoma 14.5
Browser: Chrome 125
Device: MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Ensure Sufficient Contrast for Edit Link Brackets in Dark Mode

  1. Enable dark mode.
  2. Navigate to any old page, such as this one.
  3. Use a contrast checker tool to measure the contrast of the edit link brackets.
  4. AC1: Confirm that the edit link brackets have sufficient contrast and meet WCAG AA standards.

2024-05-29_13-32-15.png (1×3 px, 621 KB)

Jdlrobson claimed this task.