Page MenuHomePhabricator

Accessibility improvements when Phonos button has error
Closed, ResolvedPublicBUG REPORT

Assigned To
Authored By
dom_walden
Mar 1 2023, 10:48 AM
Referenced Files
F40428956: TB2.webm
Oct 26 2023, 10:24 PM
F40428867: CV2.webm
Oct 26 2023, 10:24 PM
F40428757: NVDA2.webm
Oct 26 2023, 10:24 PM
F40428775: VO2webm
Oct 26 2023, 10:24 PM
F40428953: TB1.webm
Oct 26 2023, 10:24 PM
F40428866: CV1.webm
Oct 26 2023, 10:24 PM
F40428754: NVDA1.webm
Oct 26 2023, 10:24 PM
F40428761: VO1.webm
Oct 26 2023, 10:24 PM

Description

What is the problem?

There are things that make Phonos buttons with errors less accessible for screenreader users.

For example:

  1. If there is an error and no file parameter has been passed, the button does not have an aria-label. So this happens when you are trying to generate audio with IPA or pulling from Wikidata.
  2. If there is an error and file is passed, the aria-label is "Play audio". As we know already that this button has an error, would could make the aria-label reflect this.
  3. The error message popup is not accessible to screenreaders (at least not when I tested it with NVDA, Orca and VoiceOver). Therefore, the user does not know what is causing the error.
Steps to reproduce problem
  1. See examples of error conditions here https://en.wikipedia.beta.wmflabs.org/wiki/Phonos_Errors or https://en.wikipedia.beta.wmflabs.org/wiki/Phonos_Combinations
  2. Try to use it with different screenreaders (NVDA, Orca, VoiceOver, TalkBack)
Environment

Wiki(s): https://en.wikipedia.beta.wmflabs.org Phonos 0.1.0 (0b9e293) 19:15, 28 February 2023.

QA Results - Beta

Event Timeline

Change 958069 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/Phonos@master] Change aria-label for errors, and link button and popup

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

Samwilson subscribed.

The error message popup is not accessible to screenreaders (at least not when I tested it with NVDA, Orca and VoiceOver). Therefore, the user does not know what is causing the error.

I'm not really sure, but it sounds like it might be correct to add aria-describedby to the button, pointing to the popup element. I've done so in the above patch.

Change 958070 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/Phonos@master] Always supply error messages from server

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

Change 958070 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Always supply error messages from server

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

Change 958069 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Change aria-label for errors, and link button and popup

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

@Samwilson When the error message pops up (at least the first time), it is not automatically spoken by the screen reader. You need to reactivate the button somehow (e.g. tab away and then back).

I wonder if it would be good to use ARIA role=alert or something similar?

Change 967397 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/Phonos@master] Add aria-live="assertive" to error popup body

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

Change 967397 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Add aria-live="assertive" to error popup body

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

Good catch. The example they give doesn't seem to work though, or at least I can't get it to read out the error messages.

However it looks like aria-live="assertive" on the popup body works.

@Samwilson The error message popup appears only VoiceOver and Talkback. All four screenreaders do say the error though as seen in the .webm's below. This will be moved to Done. Thanks for all your work!

Status: ✅PASS
Environment: Beta: 1.42.0-alpha (9f36d83)
OS: macOS Sonoma 14.0
Browser: Chrome 117, Firefox 118, Safari 17.0
Device: MBA M2
Emulated Device::BrowserStack for NVDA & Talkback
Test Links:
https://en.wikipedia.beta.wmflabs.org/wiki/Phonos_Combination

✅AC1: https://phabricator.wikimedia.org/T330851

VoiceOver-Popup &VoiceNVDA-Just VoiceChromeVox-Just VoiceTalkback-Popup &Voice