Repository navigation
More accessibility customization - take background component out of focus order #1599
Replies: 2 comments 3 replies
|
Hi guys, Anyway, I've noticed that if I set the BottomSheetBackgroundComponent accessible={false}, I CAN'T close the Bottom Sheet with the voice over if I "magic tap" in the backDrop, unless the modal is far smaller then the screen. Have you @ally-bryand the same problem? |
|
VoiceOver cannot reach or focus interactive elements inside BottomSheetModal content — modal boundary and handle/children accessibility scoping issue Environment@gorhom/bottom-sheet: [your version] SummaryWhen a BottomSheetModal contains interactive elements (e.g. buttons) alongside a custom handleComponent, VoiceOver's swipe navigation cannot reliably reach those interactive elements. Focus instead loops between the background/backdrop and the handle's content, never entering the scrollable/content area where the interactive elements live. Reproduction:Observed behaviorWith VoiceOver on, swiping right from the top of the screen after the sheet opens produces this traversal order: Backdrop/background element Expected behaviorFocus should enter the sheet's content once presented, exclude the backdrop and underlying screen entirely (standard modal behavior), and traverse each interactive element in order. What I tried, none of which resolved it:Setting accessibilityViewIsModal={true} on the outer content wrapper (both alone and combined with importantForAccessibility on Android) My working theoryhandleComponent and children appear to render into separate branches under the sheet's portal, rather than one continuous accessible subtree. This seems to prevent a single accessibilityViewIsModal boundary (or Android's equivalent isolation) from correctly scoping the whole presented sheet, which may be why focus keeps resolving back out to the backdrop instead of proceeding through the sheet's content in order. Question for maintainers: Is there a recommended pattern for scoping a single modal accessibility boundary around both handleComponent and children together (e.g. via containerComponent, if that's intended for this)? If not, would this be a reasonable feature request, or is there prior discussion/context on this that I should be pointing to instead of filing new? Happy to provide a minimal repro repo if that would help triage this. |
Uh oh!
There was an error while loading. Please reload this page.
Hi @gorhom.
My team is currently using your bottom sheet, but the bottom sheet currently has some built-in a11y features that don't align with our needs. Specifically, the
BottomSheetBackgroundComponentisaccessible, and shows up in the accessibility focus order. We need the option to set thataccessibleprop tofalsefor it to not be focusable. Here is the code I'm referring to:Would you be okay with making
accessiblemodifiable through props? If so, I would be okay with attempting to do the work myself and submitting an MR.All reactions