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

Improve accessability of UI #47

Merged
merged 1 commit into from
Apr 23, 2020

Conversation

adamfranco
Copy link
Contributor

Because vmsg appends its controls to the end of the DOM, it is not easy to
focus to the record button when the dialog is launched as keyboard-users
need to tab to through the page to the end of the DOM where the dialog lives.

Here is an example of what it is like to interact with vmsg in its current state using the built-in Apple MacOS screen reader, "VoiceOver":
https://youtu.be/TT7-0h-5iOQ

Adding recordBtn.focus() when the record dialog is drawn jumps the focus point right to the dialog, prevents the need for extra navigation and allows the record button to be activated right away.

What happens when recording is started or stopped is that the record/stop buttons are hidden, causing focus to jump to a different part of the page. Adding stopBtn.focus() and recordBtn.focus() triggers when buttons are swapped ensures that
keyboard users can access the buttons without re-navigating to them.

In addition to these focus changes, this PR adds title text to the buttons. Their purpose is
otherwise hidden from screen-readers.

Here is an example of what it is like to interact with vmsg with these changes:
https://youtu.be/_YxWQzVhCwI

Because vmsg appends its controls to the end of the DOM, it is not easy to
focus to the record button when the dialog is launched as keyboard-users 
need to tab to through the page to the end. Adding `recordBtn.focus()` jumps
the focus point right to the dialog, aiding navigation when then dialog is opened.

Additionally, when recording is started, hiding the record button can cause focus
to jump to the beginning of the page, re-focusing on the stop button ensures that
keyboard users have the stop button focused without re-navigating to it. Similarly,
when stopping recording, shift the focus back to the newly visible record button.

In addition to these focus changes, add title text to the buttons. Their purpose is
otherwise hidden from screen-readers.
@Kagami Kagami merged commit 0257f75 into Kagami:master Apr 23, 2020
@Kagami
Copy link
Owner

Kagami commented Apr 23, 2020

Thanks. Nice videos :)

@adamfranco adamfranco mentioned this pull request Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants