Page MenuHomePhabricator

Remove custom handling of aria-expanded in Vector checkbox hack buttons
Closed, ResolvedPublic

Description

Background

Prior to T294164 (specifically this patch) Vector was not using all of core's checkbox hack JS implementation. Instead, we were using a no-js solution that spoofed aria-expanded status for checkbox hack buttons in Vector.

Now that we are relying on JS from core to provide this behavior, the expanded status is being announced twice. If we want to support the expanded status for no-js users in the future this could be made in core, or inside the new design system.

More context

AC

When accessing a dropdown button in a screenreader, it reads out "expanded" or "collapsed" only once.
No-js users won't read out "expanded"/"collapsed"

Developer notes

This should mostly be deleting code inside Menu.mustache and MenuDropdown.less

QA Results - Beta

ACStatusDetails
1T299173#7802352
2T299173#7802352

QA Results - Prod

ACStatusDetails
1T299173#7802353
2T299173#7802353

Event Timeline

Change 770833 had a related patch set uploaded (by Abhigya Pandey; author: Abhigya Pandey):

[mediawiki/skins/Vector@master] Remove custom handling of aria-expanded in Vector checkbox hack buttons

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

Hi, @Jdlrobson and @bwang I made a PR on this issue with correct changes to my knowledge, please review it if something more is needed to be done then kindly suggest me:) .

Adding a patch from volunteer to sprint board so that it doesn't get lost. As @bwang made this task I'd like him to review.

Jdlrobson triaged this task as Low priority.

Change 770833 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Remove custom handling of aria-expanded in Vector checkbox hack buttons

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

Test Result - Beta

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

Test Artifact(s):

QA Steps

✅ AC1: When accessing a dropdown button in a screenreader, it reads out "expanded" or "collapsed" only once.

Screen Recording 2022-03-23 at 6.54.32 PM.mov.gif (1,238×930 px, 852 KB)

✅ AC2: No-js users won't read out "expanded"/"collapsed"

Screen Recording 2022-03-23 at 6.56.24 PM.mov.gif (1,238×930 px, 481 KB)

Edtadros subscribed.

Test Result - Prod

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

Test Artifact(s):

QA Steps

✅ AC1: When accessing a dropdown button in a screenreader, it reads out "expanded" or "collapsed" only once.

Screen Recording 2022-03-23 at 6.59.35 PM.mov.gif (1,238×930 px, 404 KB)

✅ AC2: No-js users won't read out "expanded"/"collapsed"

Screen Recording 2022-03-23 at 6.57.57 PM.mov.gif (1,238×930 px, 871 KB)

Looks good, resolving