I'm using @gorhom/react-native-bottom-sheet library (v4.6.4) and need to provide accessibility features to my mobile project, now specifically adding keyboard navigation support, focusing on interactive elements.
Current problem/behaviour: When interacting with an opened bottom sheet and using Accessibility Inspector, it looks like the focus is trapped between the slider and the main content, and I can't focus individual children elements.
What I tried: Updating the library to the latest version, using accessibility attributes on BottomSheetModal, BottomSheetView and on an individual TextInput I added for testing.
On my main project I'm returning this:
<BottomSheetModal
enableDynamicSizing={true}
ref={bottomSheetRef}
onChange={handleSheetChanges}
topInset={top}
enableHandlePanningGesture={true}
enablePanDownToClose={true}
backdropComponent={Backdrop}
backgroundStyle={styles.background}
keyboardBehavior={Platform.OS === 'ios' ? 'interactive' : 'fillParent'}
keyboardBlurBehavior="restore"
android_keyboardInputMode="adjustResize"
{...bottomSheetProps}
>
<BottomSheetView>
<View style={{ ...styles.container, paddingBottom: bottom }}>
{children}
</View>
</BottomSheetView>
</BottomSheetModal>
Has anyone passed through this, or even better, solved it? Does this library allow for this, or is it better to consider another option?
Thank you and have a nice week! 🙂