You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
react-native built-in elements are not queriable with byRole queries if you don't set the accessibilityRole prop.
Expected behaviour
byRole queries should be able to match some elements without accessibilityRole.
We however need to be conscious of what roles should be used to match what elements. My suggestion is checking each element with a voice-over and see what matches:
should <Pressable /> be button by default?
<TextInput /> will read Input on ios voiceover, but that is not an AccessibilityRole as exported by react-native.
We might need to think about types. The point raised in #1127 (comment) that suggests using TextMatch for the role will make it harder to discover those cases.
Steps to Reproduce
Unable to find an element with accessibilityRole: image
140 | const { getByRole } = render(<Image />);
141 |> 142 | getByRole('image');| ^
143 | });
144 | });
145 |