Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

[MM-18385] Force screen reader to read whole aria-live section on multiselect option change #3679

Merged
merged 1 commit into from
Sep 19, 2019

Conversation

devinbinnie
Copy link
Member

Summary

Firefox was not correctly reading the aria-live region of the multiselect component, instead it was reading bits and pieces as the text field was updated. This PR adds the aria-atomic label, which ensures the entire option is read correctly.

NOTE: Microsoft Edge continues to have issues with JAWS and NVDA. See: FreedomScientific/standards-support#266
Hopefully this will be fixed soon.

Tested on Firefox 69.0 and JAWS 2019.1907.42

Ticket Link

https://mattermost.atlassian.net/browse/MM-18385

@devinbinnie devinbinnie added 2: Dev Review Requires review by a core commiter 3: QA Review Requires review by a QA tester CherryPick/Candidate A candidate for a quality or patch release, but not yet approved labels Sep 16, 2019
@devinbinnie devinbinnie requested review from srkgupta and a team September 16, 2019 16:30
@ghost ghost requested review from hmhealey and jespino and removed request for a team September 16, 2019 16:30
Copy link
Member

@hmhealey hmhealey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if I understand what aria-atomic does, but why is it necessary here? Without it, it sounds like the screen reader will read out anything that changes in the label, but with it, it would read the entire label if any part of it changes?

Also, is it a problem that the outer .multi-select__wrapper div has an aria-live while the label nested inside it also has an aria-live?

@srkgupta
Copy link
Contributor

Hi @devinbinnie
Will this also fix the other issue reported in the ticket, i.e.
Reader does not reads 'no results found' in the Direct messages Modal

Can you please check and confirm. If not, can you please fix this issue too.

Copy link
Member

@jespino jespino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@devinbinnie
Copy link
Member Author

@hmhealey aria-atomic forces the screen reader to read the label as a whole rather than individual text updates. My guess as to what was happening here was that the label was being read before the entire text string was interested, and it was reading each bit as it was inserted.

It seems really odd for it to be doing that, as I would assume the entire string would be inserted as a whole, but it appears to be the case as aria-atomic forced the reader to stop doing that. A11y standards are not consistently implemented across browsers as we can see.

@devinbinnie devinbinnie added the Setup Cloud Test Server Setup a test server using Mattermost Cloud label Sep 17, 2019
@devinbinnie
Copy link
Member Author

devinbinnie commented Sep 17, 2019

@hmhealey @srkgupta Well, it seems like my fix might not have done anything, as I can't get it to read properly with JAWS anymore. NVDA seems to read aria-live, but sometimes it reads multiple times...might be related to the above bug where Firefox read output multiple times.

JAWS refuses to read aria-live tags in Firefox. I'm sensing there's a bug in either the browser or JAWS, I don't think this is an issue with our software anymore.

@devinbinnie
Copy link
Member Author

@asaadmahmood Do you recall adding any aria-hidden or any sort of tags that would hinder this from being read? That's the only thing I can think of having an issue with our software.

@asaadmahmood
Copy link
Contributor

@devinbinnie Don't think so.

@devinbinnie
Copy link
Member Author

Okay after further investigation I've identified this issue as an issue between JAWS and Firefox. See the JIRA ticket for more information.

We can still merge this as a fix for the Direct Messages modal reading individual pieces of the names, as the reading still works with Firefox using NVDA.

@srkgupta srkgupta removed the 3: QA Review Requires review by a QA tester label Sep 18, 2019
@hmhealey hmhealey added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a core commiter labels Sep 19, 2019
@devinbinnie devinbinnie added CherryPick/Candidate A candidate for a quality or patch release, but not yet approved and removed CherryPick/Candidate A candidate for a quality or patch release, but not yet approved labels Sep 19, 2019
@devinbinnie
Copy link
Member Author

@amyblais can this go into v5.16? I think it should as we should be supporting NVDA as much as possible.

@amyblais amyblais added CherryPick/Approved Meant for the quality or patch release tracked in the milestone and removed CherryPick/Candidate A candidate for a quality or patch release, but not yet approved labels Sep 19, 2019
@amyblais amyblais added this to the v5.16.0 milestone Sep 19, 2019
@amyblais
Copy link
Member

Sounds good,

@devinbinnie devinbinnie merged commit a8b83a5 into mattermost:master Sep 19, 2019
@devinbinnie devinbinnie deleted the MM-18385 branch September 19, 2019 18:00
@mattermod mattermod added CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone and removed CherryPick/Approved Meant for the quality or patch release tracked in the milestone labels Sep 19, 2019
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Sep 20, 2019
@hanzei hanzei removed the Setup Cloud Test Server Setup a test server using Mattermost Cloud label Sep 23, 2019
jwilander pushed a commit that referenced this pull request Sep 24, 2019
skheria pushed a commit to uber-archive/mattermost-webapp that referenced this pull request Oct 3, 2019
skheria pushed a commit to uber-archive/mattermost-webapp that referenced this pull request Oct 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone Docs/Not Needed Does not require documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants