-
-
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
Mobile: Accessibility: Improve sidemenu notebook list accessibility #11556
base: dev
Are you sure you want to change the base?
Conversation
importantForAccessibility, | ||
'aria-hidden': accessibilityHidden, | ||
importantForAccessibility, // Android | ||
accessibilityElementsHidden: accessibilityHidden, // iOS | ||
'aria-hidden': accessibilityHidden, // Web |
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.
This fixes an issue where the folder icon to the left of the "Notebooks" heading was accessibility focusable on iOS (with no label or description). On Android and Web, the same icon is hidden for accessibility.
aria-pressed={!collapsed} | ||
accessibilityState={{ checked: !collapsed }} | ||
// The togglebutton role is only supported on Android and iOS. | ||
// On web, the button role with aria-pressed creates a togglebutton. |
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.
Relevant documentation: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/button_role#description
Summary
This pull request fixes several accessibility issues:
useOnLongPressProps
. On Android and iOS, this notifies accessibility tools that a long-press/context menu action is available.useOnLongPressProps
hook to be used,renderFolderItem
is converted to a separate React component.off
on Android.(level <depth>)
is appended to the description of subnotebooks folder items. For example, level-1 subnotebook might be described asNotebook title (level 1)
. This change does not affect toplevel notebooks.separator
role (only supported on web).Testing plan
Android 13:
on, Expand <notebook name> switch
for some<notebook name>
.Web (Chromium):
h
. Verify that Orca navigates to the "Notebooks" heading.Expand <notebook name>, toggle button pressed
(replacing<notebook name>
with the title of the notebook).iOS 18.2: