Current State: The "is_dark_mode_on" field in the Wikimedia Event Emitters is hardcoded to default to false, which doesn't accurately reflect the user's current browsing environment.
Proposed Update: Modify the WikimediaEvents webAccessibility.js to dynamically capture the dark mode status of the webpage by extracting it from the relevant HTML property.
SC: The event emitters provide precise information about the user's dark mode preferences.
UPDATE: We are deprecating is_dark_mode_on and using dark_mode_setting instead.
Testing Instructions:
Event Firing Verification - Night Mode Enabled:
Steps:
- Enable dark mode on the webpage.
- Monitor the emitted events in Network Tab.
- Verify that the "dark_mode_setting" field in the event object is set to "1".
Event Firing Verification - Night Mode Disabled:
Steps:
- Disable dark mode on the webpage.
- Monitor the emitted events in Network Tab.
- Verify that the "dark_mode_setting" field in the event object is set to "0"
QA Results - Beta
AC | Status | Details |
---|---|---|
1 | ✅ | T356335#9574126 |
2 | ❌ | T356335#9574126 |
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T356335#9598586 |
2 | ✅ | T356335#9598586 |