-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Desktop: Accessibility: Improve note list keyboard and screen reader accessibility #10940
Desktop: Accessibility: Improve note list keyboard and screen reader accessibility #10940
Conversation
The listbox role isn't as good a fit with the note list's functionality (particularly for more complicated list items). However, Windows Narrator reads nothing with the 'grid' role. (Perhaps it was incorrectly applied?)
data-id="todo-checkbox" | ||
type="checkbox" | ||
aria-label="{{note.todoStatusText}}" | ||
tabindex="-1" |
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.
Without tabindex="-1"
, it's possible to focus just the checkbox in some cases. (For example, when navigating from the note title input with shift-tab).
&:hover, :focus-visible > & > .content { | ||
&:hover, &.-focus-visible > .content { |
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.
Focus is no longer directly on each list item. Instead, the note list itself has focus and communicates the selected item using aria-selected
and aria-activedescendant
. MDN includes an example that takes a similar approach.
To style the sidebar differently when it has keyboard focus, the -focus-visible
class is added (related to WCAG 2.2, SC 2.4.7).
Summary
This pull request improves the note list's screen reader and keyboard accessibility.
In particular, it,
This is related to #10795.
Remaining work
listbox
ARIA Practicing Guides page and their section on focus vs selection.Notes
listbox
role to the note list (see the WAI ARIA Authoring Guide's Listbox Pattern).grid
role for the note list. This change was reverted because it seemed to prevent Windows Narrator from reading the content of the note list. The note list was read correctly with Orca on Linux.grid
role was incorrectly implemented.role=grid
may be a better fit thanrole=listbox
—grid
should support multiple columns and possibly support focusing elements within a note list item.role=listbox
seems to fit the default note list renderer.Testing plan
Existing issues: I've observed at least one issue that seems to have also been present before this pull request:
Linux (with the Orca screen reader running):
Notes: Multi-select list with 2156 items: Test: 997
, whereTest: 997
is the name of the note.Test: 996
. Pressing Down again readsTest: 995
.Incomplete to-do, test to-do, incomplete to-do checkbox not checked
(after reading information about the note list).Complete to-do, test to-do, complete to-do checkbox checked. Complete.
Complete
is to support Windows, where "Complete to-do, test to-do, complete to-do checkbox checked" is not read in at least some cases.Note: This is being edited — ctrl-enter (which opens a pull request) was pressed accidentally.