Repository navigation
Open
Labels
Issue: Author Provided ReproThis issue can be reproduced in Snack or an attached project.This issue can be reproduced in Snack or an attached project.Platform: iOSiOS applications.iOS applications.
Description
Description
since version v0.73.0 the roles for radio & checkbox are not announced by Screen readers on ios
this was working in v0.72.10 but stopped working in v0.73.0
Steps to reproduce
- install the app with
yarn ios - navigate with a screenreader or Accessibility inspector to the text
Welcome to React Nativeand go down from there - listen to the output - it does not announce roles for
radio&checkbox-buttonis still announced fine
React Native Version
0.73.5
Affected Platforms
Runtime - iOS
Output of npx react-native info
System:
OS: macOS 13.6.1
CPU: (10) arm64 Apple M1 Max
Memory: 1.12 GB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 20.10.0
path: ~/.nvm/versions/node/v20.10.0/bin/node
Yarn:
version: 1.22.21
path: ~/.nvm/versions/node/v20.10.0/bin/yarn
npm:
version: 10.2.3
path: ~/.nvm/versions/node/v20.10.0/bin/npm
Watchman:
version: 2023.11.06.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.2
- iOS 17.2
- macOS 14.2
- tvOS 17.2
- visionOS 1.0
- watchOS 10.2
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10811636
Xcode:
version: 15.2/15C500b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.15
path: /Users/lutz.kwauka/.sdkman/candidates/java/current/bin/javac
Ruby:
version: 2.6.10
path: /Users/lutz.kwauka/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.5
wanted: 0.73.5
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Stacktrace or Logs
no crash happened
Reproducer
https://github.com/lutzk/accessibility-reproducer/
Screenshots and Videos
v0.72.10 working:
https://github.com/facebook/react-native/assets/793755/cec0dd90-6b7b-40d1-9fb5-9cd1d00e3f97
v0.73.5 not working:
https://github.com/facebook/react-native/assets/793755/c86794d2-f4fa-43df-835e-93315a63aa46
Reacted by Alexis Mangin, Davor Bauk, duytohoang, Bill O'More, Victor-Porter, sergibordessecanda, Arran Woodruff, Douglas Nassif Roma Junior, Gab and Dylan Ward
Reacted by Bill O'More
Reacted by Güneş Eser and Bill O'More
Metadata
Metadata
Assignees
Labels
Issue: Author Provided ReproThis issue can be reproduced in Snack or an attached project.This issue can be reproduced in Snack or an attached project.Platform: iOSiOS applications.iOS applications.
Activity
NickGerleman commentedon Mar 4, 2024
Bug added with 2d07d5f
Accidentally miscopied some mappings from previous JS shim.
NickGerleman commentedon Mar 4, 2024
Hmm, actually, I am seeing these were mapping to
UIAccessibilityTraitNonebefore that change as well.Let me check if they are read someone else. The blamed commit is potentially responsible for changes though.
NickGerleman commentedon Mar 4, 2024
Okay, these roles are specially handled here: https://github.com/facebook/react-native/blob/ec928d7a669fa2624bcf7da520041f140dd0fb03/packages/react-native/React/Views/RCTView.m#L343
There was another change around localization of these strings, but
RCTLocalizedStringdoes work a bit differently in OSS and internal (and the translation part has not been wired to external).@lutzk would you be willing to take a look around this area, to see what might be happening in current OSS build?
IIRC I might have primarily tested this on new arch as well.
lutzk commentedon Mar 7, 2024
Thank you for looking into it!
i can have a look into it but i am not experienced with objC so probably not of much help
NickGerleman commentedon Mar 11, 2024
Also FYI @Saadnajmi who needed to touch this recently for macOS.
pal-roy commentedon May 16, 2024
@Saadnajmi Have you had a chance to look at it or @lutzk do we have any ideas here on a potential fix.
jacobarvidsson commentedon May 16, 2024
This seems to apply to 'tab' role as well, but other roles like 'button' and 'header' works correctly.
Saadnajmi commentedon May 16, 2024
@FalseLobster fyi as well
sladek-jan commentedon May 21, 2024
My suspicion is that the if-checks added in 2d07d5f are too strict and they exclude valid cases:
Views such as
radiohave no matching trait inUIAccessibilityTraits, so the if-block won't be executed and neitherrolenoraccessibilityRolewill be set onview.reactAccessibilityElement.As a result, they have no role and hence none is accounced by the SR.
could that be the case or am I missing something, @NickGerleman ?
sladek-jan commentedon Jun 18, 2024
Here is how I fixed it in case that someone finds it helpful:
Additionally, we needed to add key-value pairs to React/I18n/strings/<locale>.lproj/Localizable.strings so that roles are read out in the user's target language and not in English. Keys were determined by debugging the RCTLocalizedStringFromKey function, for example:
scottgrunerud commentedon Mar 26, 2025
+1 This is a pretty large accessibility issue.
RayKay91 commentedon Apr 23, 2025
Looks like if you manually add aaccessibilityLabelVoiceOver reads it out as{accessibilityLabel} radio button, {checked/unchecked}Looks like this is no longer working for some reason.
Can confirm the patch above does work, however.
kaua-melo commentedon Jul 18, 2025
It seems that it's not just "radio" and "checkbox" that are broken.
"tab" and "tablist" roles are also not being announced by VoiceOver.
Tested on React Native 0.76, iPhone 13, iOS 18.5.
Minimal example:
VoiceOver reads:
but it never says "tab", "tab bar", or "tab list".
Ideally, would be nice if this worked without needing to provide accessibilityLabel manually, since maintaining translations across the app would be error-prone and unnecessary for built-in roles.
JorenVos commentedon Aug 14, 2025
Bump. Pretty critical issue (as mentioned earlier)
thaiscristine commentedon Aug 25, 2025
+1 This is a pretty large accessibility issue.
hajrullinbulat commentedon Sep 1, 2025
Please fix
MorganLKestner commentedon Oct 10, 2025
bumping, any update on timeline when this will be worked on?
DylanWard14 commentedon Nov 24, 2025
Bump, we are running into this issue and our app has very strict accessibility requirements
GBS05577-Andrea commentedon Dec 22, 2025
Bump.
If iOS traits do not have a corresponding value for certain roles, it should at least be clarified in the documentation.
paul-moers commentedon Jan 22, 2026
Also experiencing this issue. I hope this gets fixed soon, as it's a pretty large accessibility issue.
fix(nurse-create): apply 4 KPI-judge remediations