Steps to reproduce
- Enable the Accessibility for Reading beta feature on Meta if you haven’t done so yet.
- Open https://meta.wikimedia.org/wiki/User_language?useskin=vector-2022
- Switch to night mode.
- Notice that the babel boxes have dark text on light background.
- Switch to automatic mode, and make sure that your browser requests dark mode.
Actual result
- Notice that the Babel boxes suddenly have light text color on light background, which is unreadable.
Expected result
- Notice that you don’t notice any change.
Software version
Meta has 1.43.0-wmf.22, reproduced locally with the latest master of Vector and Babel.
Other information
I noticed this on Babel boxes, but it’s not Babel’s fault: the extension applies notheme since rEBAB62fe9a44f132, which should be enough to not get light text color. Apparently it’s enough in forced night mode but not in automatic night mode.
For newcomers
Please add the relevant line to https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/skins/Vector/+/refs/heads/master/resources/skins.vector.styles/CSSCustomProperties.less#113
Derived Requirement
Ensure that Babel boxes maintain readable text color when switching between night mode and automatic mode in the Vector 2022 skin, with appropriate text and background contrast.
BDD
Feature: Maintain Readable Text Color in Babel Boxes When Switching Between Night and Automatic Modes
Scenario: Ensure Babel boxes have appropriate text color in night mode
Given the Accessibility for Reading beta feature is enabled And the user is viewing a page with Babel boxes in the Vector 2022 skin When the user switches to night mode Then the Babel boxes should have dark text on a light background for readability
Test Steps
Test Case 1: Ensure Readable Text Color in Babel Boxes in Night Mode
- Enable the Accessibility for Reading beta feature on Meta.
- Visit https://meta.wikimedia.org/wiki/User_language?useskin=vector-2022.
- Switch to night mode.
- AC1: Confirm that the Babel boxes display dark text on a light background.
QA Results - Meta
AC | Status | Details |
---|---|---|
1 | ✅ | T374794#10200209 |