mobile-dev-inc / maestro

Painless Mobile UI Automation
https://maestro.mobile.dev/
Apache License 2.0
5.85k stars 276 forks source link

Nested Text accessibility (without Touchables) on React Native #821

Open matt-dalton opened 1 year ago

matt-dalton commented 1 year ago

I've seen the guidance on nested text here.

The example there suggests wrapping each Text with TouchableOpacity. Also the texts themselves aren't actually nested, but the TouchableOpacitys are.

It's quite common in React Native to nest the texts themselves (usually to inherit the styling from the outer Text). A common use-case here is to add onPress to the text itself, rather than wrapping in a button. Like this: Screenshot 2023-02-21 at 13 04 04

If I try this, only the overall text is shown as something accessible

Screenshot 2023-02-21 at 12 33 09

Should this work? Is this a react native issue, or a maestro issue?

My problems with the example in the docs are that:

fmsouza commented 7 months ago

I'm having the exact same problem. Is there a solution for this problem?