Page MenuHomePhabricator

Unstyled buttons are now ugly when prefers-reduced-motion is enabled
Closed, ResolvedPublicBUG REPORT

Description

Unstyled buttons, e.g. when editing a page with the source editor, are now showing up in an ugly style that is neither the browser default nor the Wikimedia style when prefers-reduced-motion is enabled.

It seems to be caused by a background-attachment: initial !important; rule - disabling it using the browser's dev tools causes the buttons to revert to their usual default style.

Screenshot taken when editing Project:Sandbox on mediawiki.org:

Bildschirmfoto_2022-05-18_21-32-56.png (197×839 px, 37 KB)

QA steps

QA Results - Prod

ACStatusDetails
1T308705#7997372

Event Timeline

TheDJ subscribed.

This is a consequence of T254399

Setting any property of a standard button (even to its initial value) will disable all user agent styles. As all elements are targeted, that explains these results.

To some degree, the problem is also that these very old buttons are unstyled to begin with. Worse, their styling differs almost per wiki as many wikis have adapted these buttons (most wikis feature a JS dropdown to switch between different sets of characters to insert).

That whole area is a bit of a mess and unmaintained but one of those areas that the most hardcore and oldest users of wikis are extremely attached to.

Regardless, we probably have more unstyled elements where this problem can also occur

It's best to remove background-attachment: initial rule here, we don't use it anywhere in deployed extensions or skins.

Change 793548 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/core@master] mediawiki.skinning: Amend prefer-reduced-motion accessibility rules

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

Change 793548 merged by jenkins-bot:

[mediawiki/core@master] mediawiki.skinning: Amend prefer-reduced-motion accessibility rules

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

Edtadros added subscribers: Jdlrobson, Edtadros.

Test Result - Beta

Status:
Environment: beta
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

❓ AC1: Unstyled buttons should not appear when editing a page with source editor.

@Jdlrobson, I can see the unstyled buttons on the mediawiki link in the description. However I don't see any buttons at all on beta. I've tried a number of different types of pages. Let me know if there is a particular page I should see these buttons on beta. Here is what I see:

Screen Shot 2022-05-26 at 6.33.21 AM.png (1×1 px, 260 KB)

Jdlrobson updated the task description. (Show Details)
Jdlrobson moved this task from QA to QA in Prod on the Web-Team-Backlog (Kanbanana-FY-2021-22) board.

Looks like this can only be tested in production. I've added some QA steps.

Test Result - Prod

Status:
Environment: enwiki
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

❓ AC1: Unstyled buttons should not appear when editing a page with source editor.

//@Jdlrobson, I see the buttons specified in the description briefly, but then they flash back to the ones we don't want. Before I fail this I'm wondering if there's anything you can think of in my settings that could be causing this/

Screen Recording 2022-06-02 at 9.57.49 AM.mov.gif (1×1 px, 549 KB)

@Edtadros I am not able to replicate. Can you check you have all gadgets disabled?

@Nikki is this working as expected for you?

Test Result - Prod

Status: ✅ PASS
Environment: mediawiki
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: Unstyled buttons should not appear when editing a page with source editor.

//@Jdlrobson, disabling the Edittools gadget did the trick./

Screen Shot 2022-06-12 at 6.00.03 PM.png (1×920 px, 271 KB)