gorhom / react-native-bottom-sheet

A performant interactive bottom sheet with fully configurable options 🚀
https://gorhom.github.io/react-native-bottom-sheet/
MIT License
6.73k stars 743 forks source link

[v2] Accessibility not found for element inside bottom sheet (iOS only) #712

Closed moxspoy closed 2 years ago

moxspoy commented 2 years ago

Bug

Hi! i am working to automate test component that using BottomSheet. The problem is Appium (my test framework) can not get element inside the bottom sheet on iOS device. However, it works on Android device. My expectation is i can get the element inside the bottom sheet so that i can take action such as press on the button etc. The actual condition is, i only get one accessibility label "Bottom Sheet" that covering all area in the screen.

Environment info

Library Version
@gorhom/bottom-sheet 2.4.0
react-native 0.61.5
react-native-reanimated 1.7.0
react-native-gesture-handler 1.3.0

Steps To Reproduce

  1. Open Appium & use inspect element
  2. Open the bottom sheet in the app
  3. select the element inside the bottom sheet (e.g text component)
  4. The accessibility label for the text is not found

Describe what you expected to happen:

  1. The text inside the bottom sheet which i selected above can be found

Reproducible sample code

return (
        <View style={Style.container}>
            <Button text={'TOGGLE'} onPress={onPress} />
            <BottomSheet
                ref={bottomSheetRef}
                snapPoints={snapPoints}
                backdropComponent={BottomSheetBackdrop}>
               <View style={{
                   backgroundColor: Color.white,
                   padding: 30,
               }}>
                   <Text accessibilityLabel="this_label">This</Text>
                   <Text>is</Text>
                   <Text>content</Text>
                   <Text>that is not accessible</Text>
               </View>
            </BottomSheet>
        </View>
    );

Screen Shot 2021-10-21 at 10 42 51

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 2 years ago

This issue was closed because it has been stalled for 5 days with no activity.

JoNesVai commented 2 years ago

I have the same problem. Is there any solution for this problem or some fix in near future scope?

turker0 commented 2 years ago

Having same issue

JoNesVai commented 2 years ago

@oguzturker8 Update to the newest version worked for me :)

moxspoy commented 2 years ago

i can confirm that the issue has been solved in the latest release :)

turker0 commented 2 years ago

Thanks @JoNesVai @moxspoy, I'll be trying the newest version

turker0 commented 2 years ago

@JoNesVai @moxspoy Hi again, updated to ^2.4.1 but it seems not working? Which version do you use?

moxspoy commented 2 years ago

have you try using bottom sheet in simple RN project? you can inspect the element using inspector tools like appium

im using bottom sheet 4.5.1 and react native reanimated v2.4.1

turker0 commented 2 years ago

I thought it was solved on bottom sheet v2 version 2.4.1. Unfortunately i couldn't upgrade rn version to +0.63.

moxspoy commented 2 years ago

i suggest you to upgrade the version to have the latest updates both in animation or anything.