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

[MM-17786] Handle window focus events (a11y_controller.js) #3480

Merged
merged 1 commit into from
Aug 21, 2019
Merged

Conversation

deanwhillier
Copy link
Contributor

Summary

This PR updates the a11ycontroller.js to keep track of window focus so that it doesn't inadvertently make a11y visual updates when the windows comes back into focus again.

The problem was that once the window came back into focus, the element that last had focus received a focus event again and since that event wasn't triggered by a mouse click, the a11y_controller assumed it was a legit focus event and highlighted the element.

Test Steps:

  1. Click on a post (not a button or link in a post)
  2. Switch to a new tab and switch back
  3. Move the mouse without clicking

Expected: There should be no visual updates to the post (i.e. the post should not receive an a11y focus outline.

Ticket Link

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

- ensure that focus events resulting from the window regaining focus don’t inadvertently trigger a11y keyboard-related updates
@deanwhillier deanwhillier added 1: PM Review Requires review by a product manager 2: Dev Review Requires review by a core commiter 3: QA Review Requires review by a QA tester labels Aug 19, 2019
@deanwhillier deanwhillier added this to the v5.15.0 milestone Aug 19, 2019
@deanwhillier deanwhillier requested review from esethna, devinbinnie and a team August 19, 2019 16:39
@ghost ghost requested review from migbot and removed request for a team August 19, 2019 16:39
@deanwhillier deanwhillier changed the title handle window focus events [MM-17786] Handle window focus events (a11y_controller.js) Aug 19, 2019
Copy link
Member

@devinbinnie devinbinnie left a comment

Choose a reason for hiding this comment

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

LGTM!

@migbot migbot removed the 2: Dev Review Requires review by a core commiter label Aug 19, 2019
@amyblais amyblais added the CherryPick/Approved Meant for the quality or patch release tracked in the milestone label Aug 19, 2019
@esethna esethna removed the 1: PM Review Requires review by a product manager label Aug 19, 2019
@esethna esethna removed their request for review August 19, 2019 18:10
@lindalumitchell
Copy link
Contributor

Okay for QA to test post-merge. Removing QA Review label.

@lindalumitchell lindalumitchell removed the 3: QA Review Requires review by a QA tester label Aug 21, 2019
@migbot migbot added the 4: Reviews Complete All reviewers have approved the pull request label Aug 21, 2019
@migbot migbot merged commit e3c0a92 into master Aug 21, 2019
@migbot migbot deleted the MM-17786 branch August 21, 2019 17:09
@mattermod mattermod added AutomatedCherryPick and removed CherryPick/Approved Meant for the quality or patch release tracked in the milestone labels Aug 21, 2019
@amyblais amyblais added Changelog/Done Required changelog entry has been written Docs/Not Needed Does not require documentation labels Aug 21, 2019
@lindy65 lindy65 added Tests/Not Needed Does not require new release tests and removed 4: Reviews Complete All reviewers have approved the pull request Tests/Not Needed Does not require new release tests labels Aug 28, 2019
@lindy65 lindy65 added the Tests/Done Release tests have been written label Aug 28, 2019
skheria pushed a commit to uber-archive/mattermost-webapp that referenced this pull request Oct 3, 2019
- ensure that focus events resulting from the window regaining focus don’t inadvertently trigger a11y keyboard-related updates
skheria pushed a commit to uber-archive/mattermost-webapp that referenced this pull request Oct 3, 2019
- ensure that focus events resulting from the window regaining focus don’t inadvertently trigger a11y keyboard-related updates
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AutomatedCherryPick Changelog/Done Required changelog entry has been written Docs/Not Needed Does not require documentation Tests/Done Release tests have been written
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants