1

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! 🙂

2
  • 1
    Please provide enough code so others can better understand or reproduce the problem.
    – Community Bot
    Commented Apr 4 at 17:50
  • 1
    Solution was to use accessible={false} in the BottomSheetModal, that way that "view" isn't captured by Accessibility Inspector and all inside elements that can be reached will get the right focus.
    – Carla B
    Commented Apr 9 at 11:15

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.