Page MenuHomePhabricator

Use `aria-hidden` to reduce verbosity of checkbox hack dropdowns
Closed, ResolvedPublic2 Estimated Story Points

Description

Created as a result of AFB accessibility testing results T323634

a. Additionally, what are your thoughts on this alternate option, which uses aria-hidden on the label element to reduce verbosity for screen readers?

This would be an improvement for screen reader users. When navigating with the arrow keys, the screen reader announces the button a single time rather than twice where the second announcement does not provide any additional information.

AFB validated approach of using aria-hidden to hide the <label> element in the checkbox hack, as the <input> element is already labeled and is already acting as the "button" for the dropdown. Ordinarily it's considered bad practice to use aria-hidden on a visible element, but given AFB's guidance, it should be safe to use in this specific case

AC

  • Navigating dropdown buttons on screenreaders will only read out a single label
  • Navigating dropdown buttons with an aria label (i.e. language dropdown) will only read out the aria label

Developer notes

AFB used the associated patch in their testing, so we should be able to just use that as is. It has to be updated with our new dropdown templates however. We also want to test everything is correct with dropdowns using aria labels

QA Results - Beta

ACStatusDetails
1T325026#8639578
2T325026#8639578

QA Results - Prod

ACStatusDetails
1T325026#8643112
2T325026#8643112

Event Timeline

Change 805467 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] POC: Reduce verbosity of menu dropdown with aria-hidden

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

Change 805467 abandoned by Bernard Wang:

[mediawiki/skins/Vector@master] POC: Reduce verbosity of menu dropdown with aria-hidden

Reason:

needs to be updated

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

LGoto set the point value for this task to 2.Jan 12 2023, 6:27 PM
bwang removed the point value 2 for this task.

Change 805467 restored by Bernard Wang:

[mediawiki/skins/Vector@master] POC: Reduce verbosity of menu dropdown with aria-hidden

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

Jdlrobson set the point value for this task to 2.Jan 30 2023, 6:20 PM

Change 805467 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Reduce verbosity of menu dropdown with aria-hidden

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

Test Result - Beta

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

Test Artifact(s):

QA Steps

✅ AC1: Navigating dropdown buttons on screenreaders will only read out a single label

Screen Recording 2023-02-22 at 6.52.12 PM.mov.gif (1,520×668 px, 256 KB)

Screenshot 2023-02-22 at 6.54.04 PM.png (1,520×669 px, 171 KB)

✅ AC2: Navigating dropdown buttons with an aria label (i.e. language dropdown) will only read out the aria label

Screen Recording 2023-02-22 at 6.51.16 PM.mov.gif (1,520×668 px, 238 KB)

Screenshot 2023-02-22 at 6.49.45 PM.png (1,525×668 px, 233 KB)

Edtadros subscribed.

Test Result - Prod

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

Test Artifact(s):

QA Steps

✅ AC1: Navigating dropdown buttons on screenreaders will only read out a single label

Screen Recording 2023-02-23 at 7.11.00 PM.mov.gif (1,554×1,062 px, 751 KB)

Screenshot 2023-02-23 at 7.10.25 PM.png (1,559×1,038 px, 591 KB)

✅ AC2: Navigating dropdown buttons with an aria label (i.e. language dropdown) will only read out the aria label

Screen Recording 2023-02-23 at 7.14.05 PM.mov.gif (1,554×1,062 px, 489 KB)

Screenshot 2023-02-23 at 7.13.48 PM.png (1,552×969 px, 668 KB)

Edtadros updated the task description. (Show Details)