Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE1897] [MAS4.2.11][Screen Reader- Create new bot configuration] After "Save and connect", the focus goes on the hidden element and announced as "secret copied to the clipboard #1934

merged 2 commits into from Oct 18, 2019


Copy link

denscollo commented Oct 17, 2019

Solves #1897


This pull request fixes how the focus behaves after clicking the "Save and Connect" button, no longer sending the focus on the hidden element and announcing "secret copied to the clipboard"

Changes made

The problem was caused by the button, when clicked it was creating a new tag with the role alert and adding it to the body, which can then be browsed with the keyboard.
To solve this we added a timeout to this element, getting removed from the body after the notification is done.





This comment has been minimized.

Copy link

coveralls commented Oct 17, 2019

Coverage Status

Coverage decreased (-0.002%) to 66.895% when pulling 93cbd51 on fix/focus-on-hidden-alert-element into d5a714a on master.


This comment has been minimized.

Copy link

tonyanziano commented Oct 18, 2019

Is there any way we can hide the alert from being focused by giving it a tab-index of -1?

If you look at the original PR in which this alert service was added, @corinagum and I had a discussion about whether or not to remove the alert from the DOM after a period of time.

It looks like the suggested model is to leave the alert until another is created to replace it.

Also, was the duration of 1 second tried out with long alert messages? If the alert is long enough, will the screen reader be cut off when the alert is removed from the DOM?


This comment has been minimized.

Copy link
Collaborator Author

denscollo commented Oct 18, 2019

@tonyanziano we checked this using the tabindex = "-1" and it doesn't work as expected.
We read the comments on the issue and we found a way to achieve this without removing the element, which is by setting the aria-hidden attribute in the timeout function.
As for the duration of the time-out, we set it up to 5000 secs as you suggested.

The image below shows the tab index test, using the VO shortcut ctrl + left/right arrows (it stills reads the span element).

We just pushed the update with the aria-hidden attribute.

@tonyanziano tonyanziano merged commit 3b3ad1b into master Oct 18, 2019
2 checks passed
2 checks passed
Emulator-CI-PR #84286 succeeded
license/cla All CLA requirements met.
@tonyanziano tonyanziano deleted the fix/focus-on-hidden-alert-element branch Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.