Page MenuHomePhabricator

[Bug] Special:ProtectedPages has color contrast issues
Closed, ResolvedPublicBUG REPORT

Description

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

What happens?:
The element .mw-protectedpages-unknown has a custom style that is not using a design token and is thus not accessible.

screenshot 84.png (1×1 px, 300 KB)

What should have happened instead?:
The color here is equvialent to @color-placeholder or @color-disabled but the text is neither a placeholder or disabled text. Depending on what information it is trying to convey it should use a different token / color.

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

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

Requirement

Ensure that the .mw-protectedpages-unknown element on the Special:ProtectedPages page has accessible color contrast, using appropriate design tokens based on the text’s intent (e.g., placeholder or disabled).

BDD

Feature: Ensure accessible color contrast for `.mw-protectedpages-unknown` on Special:ProtectedPages

  Scenario: Verify accessible color contrast for `.mw-protectedpages-unknown`
    Given a user visits the Special:ProtectedPages page
    When they check the color contrast of the `.mw-protectedpages-unknown` element
    Then the text should have sufficient contrast as per accessibility standards
    And it should use appropriate design tokens for its intent

Test Steps

Test Case 1: Verify Accessible Color Contrast for .mw-protectedpages-unknown

  1. Visit https://test.wikipedia.org/wiki/Special:ProtectedPages.
  2. Locate the .mw-protectedpages-unknown element on the page.
  3. Check the color contrast of the element against accessibility standards.
  4. Verify that the element uses the appropriate design token based on its purpose (e.g., placeholder or disabled).
  5. AC1: Confirm that the color contrast meets accessibility standards.
  6. AC2: Confirm that the correct design token is applied to the .mw-protectedpages-unknown element.

QA Results - Prod

ACStatusDetails
1T367826#10345037
2T367826#10345037

Event Timeline

The token #72777d should be replaced with @color-base--subtle

ovasileva triaged this task as Medium priority.Jun 27 2024, 3:11 PM
Jdlrobson raised the priority of this task from Medium to High.Jul 1 2024, 4:45 PM
Jdlrobson lowered the priority of this task from High to Medium.Jul 1 2024, 4:50 PM

These should be interpreted as disabled text, so I don't think enabling this page needs to be blocked on this bug.

ovasileva added subscribers: JScherer-WMF, ovasileva.

Needs design input - not sure what the text should look like. @JScherer-WMF - could you take a look and advise as to the right token to use?

Right now we're using the hex equivalent of the depreciated color-base--subtle. We can use color-subtle for this (#A2A9B1).
It would look like this:

Screenshot 2024-09-11 at 2.18.43 PM.png (1×3 px, 704 KB)

JScherer-WMF moved this task from Incoming to Groomed on the Web-Team-Backlog board.

Unassigning myself because this is ready for estimation as far as I'm concerned.

Jdlrobson lowered the priority of this task from Medium to Low.Sep 11 2024, 9:27 PM

Change #1091821 had a related patch set uploaded (by SomeRandomDeveloper; author: SomeRandomDeveloper):

[mediawiki/core@master] Fix color contrast issue on Special:ProtectedPages

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

Change #1091821 merged by jenkins-bot:

[mediawiki/core@master] Fix color contrast issue on Special:ProtectedPages

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

Change #1091828 had a related patch set uploaded (by Reedy; author: SomeRandomDeveloper):

[mediawiki/core@REL1_43] Fix color contrast issue on Special:ProtectedPages

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

Change #1091828 merged by jenkins-bot:

[mediawiki/core@REL1_43] Fix color contrast issue on Special:ProtectedPages

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

Edtadros subscribed.
Test Result - Prod

Status: ✅ PASS
Environment: testwiki
OS: macOS
Browser: Chrome
Device: MS MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Verify Accessible Color Contrast for .mw-protectedpages-unknown

  1. Visit Special:ProtectedPages.
  2. Locate the .mw-protectedpages-unknown element on the page.
  3. Check the color contrast of the element against accessibility standards using a color contrast testing tool.
  4. Inspect the CSS styles applied to .mw-protectedpages-unknown using browser developer tools.
  5. Verify that the color corresponds to an appropriate design token:

• If the element serves as placeholder text, confirm it uses @color-placeholder.
• If the element represents disabled text, confirm it uses @color-disabled.

  1. AC1: Confirm that the color contrast meets WCAG 2.1 AA accessibility standards.

See AC2 below

  1. AC2: Confirm that the correct design token (@color-placeholder or @color-disabled) is applied to the .mw-protectedpages-unknown element.

screenshot 52.png (1×1 px, 465 KB)