-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stack header not announced by accessibility as a Heading on Android #11822
Comments
The versions mentioned in the issue for the following packages differ from the latest versions on npm:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
Android and iOS are different OS. You can't expect them to work the same. We use the native header, so whatever accessibility is provided is how native components behave. We don't control any accessibility related options for the header. |
Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro. |
Who does control the accessibility options for the native header? Normally this can be achieved by using the When you say "native" do you mean that there is not an underlying |
I found a workaround after digging around in the When the platform is Android, there is a code section that handles applying different header views based on config properties. If either react-navigation/packages/native-stack/src/views/HeaderConfig.tsx Lines 228 to 262 in 8367758
In looking at the
So the tradeoff here is that we need to set either a header title render function or set the alignment to center on all screens in order to get the proper accessibility role applied to the header text. |
Current behavior
The header label for a stack navigator is announced by VoiceOver on iOS as
Home, heading
. But using TalkBack on Android it is just announced asHome
. I would expect it to be announced in a same or similar way on Android.This is reproducible using the code from the
Creating a native stack navigator
section ofHello React Navigation
:https://reactnavigation.org/docs/hello-react-navigation/#creating-a-native-stack-navigator
Here is a Snack that is produced when clicking the
Try this example on Snack
link.https://snack.expo.dev/@justin.unterreiner.lulus/react-navigation-talkback-android-title-bug
Reproduced using Expo Go and the above snack.
Expected behavior
TalkBack should announce the label as a Heading similar to VoiceOver on iOS:
Home, Heading
.Reproduction
https://snack.expo.dev/@justin.unterreiner.lulus/react-navigation-talkback-android-title-bug
Platform
Packages
Environment
The text was updated successfully, but these errors were encountered: