Background
Follow-up to https://phabricator.wikimedia.org/T360222
Currently the onus is on skins to include the #siteNotice element for full-compatibility with notices - https://codesearch.wmcloud.org/things/?q=id="siteNotice" - we'd like to take this opportunity to define the siteNotice element in MediaWiki core.
User story
As a dark mode user I need the banners/site notices to be readable and accessible always.
Refined Requirement:
Force light mode in the #siteNotice element to ensure banners and site notices are always readable and accessible, regardless of the user's dark mode setting.
BDD
Feature: Force Light Mode in #siteNotice Scenario: Ensure light mode for #siteNotice Given the user is viewing a Wikipedia page with a site notice When the user has dark mode enabled Then the #siteNotice element should be displayed in light mode
Test Steps
Test Case 1: Ensure Light Mode for '#siteNotice'
- Open the specific URL provided for testing in production: https://ko.m.wikipedia.org/wiki/?minervanightmode=1&banner=wikilovesfolklore2024_banner.
- Ensure dark mode is enabled.
- AC1: Confirm that the #siteNotice element is displayed in light mode and is readable.
AC
- We will allow skins to request that MediaWiki core generates the element with id siteNotice.
- For backwards compatibility this will be an opt-in feature via a skin option.
- The .notheme class will be added to the element #siteNotice added by core
- Vector skins will be updated to use the new element
- Minerva skin will be updated to use the new element
- add default text color to #siteNotice in resources/src/mediawiki.skinning/interface-site-notice.less [not done: I don't think it's needed.. as notheme sets color?]
QA
- https://ko.m.wikipedia.org/wiki/?minervanightmode=1&banner=wikilovesfolklore2024_banner should be readable
Communication criteria - does this need an announcement or discussion?
No
Sign off
- Open task for updating other skins to use wrapSiteNotice.
Rollback plan
In case of any issues with banners not displaying correctly, it is safe to roll back this change by reverting the skin changes. There is no need to revert the core patch.
e.g. Revert https://gerrit.wikimedia.org/r/1023982 in case of an issue in mobile.
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T361966#9802604 |