This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 829
Update TopLeftMenu for accessibility: Keyboard shortcut, reduced screen reader noise #2994
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We use tabIndex to make elements selectable and therefore focused by screen readers. Doing this draws a blue border (in chrome at least) around the element - in some cases, we don't want this.
To avoid having them read out the user's ID
We use a trick with refs to automatically focus the element, also making use of mx_HiddenFocusable to hide the unnecessary outline. The menu itself has been restructured to hide some elements from screen readers (reduce noise) and to have a single unordered list. Screen readers mention when the user "enters" a list, and each item was previously saying "enter list <action>" when it should have just been "<action>". By focusing automatically, the keyboard can be used to go up/down the menu as may be expected by keyboard users.
jryans
suggested changes
May 20, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broadly seems good, but a few questions.
@jryans please take another look. We don't have a thing to |
jryans
approved these changes
May 21, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, let's give it a try.
hopefully
turt2live
added a commit
that referenced
this pull request
Sep 17, 2019
Fixes element-hq/element-web#10899 The `tabIndex` is required to make the thing actually focusable. This is the same trick employed in #2994
turt2live
added a commit
that referenced
this pull request
Sep 24, 2019
Fixes element-hq/element-web#10926 Regressed by https://github.com/matrix-org/matrix-react-sdk/pull/3454/files Class introduced in #2994
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reviewer: The commits are best reviewed individually as they tell a story.
See element-hq/element-web#9747 and related issues.
For a tour of how it sounds now, prepare some headphones and have a watch: https://www.youtube.com/watch?v=1r3wmGEYeek