Page MenuHomePhabricator

OAuth 'Allow' dialog is mislabeled for some screenreader + browser combinations
Closed, ResolvedPublicBUG REPORT

Description

As of several months ago, a user of JAWS screen reader reports that the OAuth dialog 'Allow' button is being read instead as "cancel privacy policy", while it previously read 'Allow' as expected. The 'Cancel' button and the 'Privacy policy' link are handled correctly.

With JAWS, this does not happen in Firefox, only Chrome.

On iOS with its built-in screenreader, a very similar bug occurs: for both the 'Allow' and 'Cancel' buttons, the screen reader reads it as "allow cancel privacy policy".

Inspecting the HTML, it's not clear to me what exactly is triggering this bug, nor whether it's technically a bug with webkit or MediaWiki or with both the iOS and JAWS screen readers, but I'm guessing it has to do with how webkit handles the :after pseudoelement. However, it's a relatively new bug; the user noticed it several months ago, but can't remember a more specific onset than that. Previously, the OAuth dialog did not have this problem.

Event Timeline

You can see the problem in the accessibility tools in Chrome developer tools – apparently the markup indicates that the entire message, including other buttons, is a label for each button.

image.png (2×3 px, 547 KB)

We already have code to mitigate this problem, but it's not working due to a typo.

Change 889649 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/OAuth@master] Fix accessibility in OAuth authorization dialog

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

You can see the problem in the accessibility tools in Chrome developer tools – apparently the markup indicates that the entire message, including other buttons, is a label for each button.

Thanks for the tip! I'll use this in the future.

Change 889649 merged by jenkins-bot:

[mediawiki/extensions/OAuth@master] Fix accessibility in OAuth authorization dialog

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