-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
iOS: Accessibility Language Support #30891
Comments
I'd like to tackle on this issue as the first contribution to this repo! |
I ran into this today and was surprised there wasn't a way to do this yet. Setting language per element can at times be essential; think flashcard and language learning apps for example. Nothing more charming then hearing an american TTS voice mangle a french sentence, I can assure you. |
I'm also running into this problem. I want to fix it. @inatonix Are there any updates? |
Would love to work on this. @grgr-dkrk any recent updates? |
@katimoth |
Hello! I found myself implementing this for personal reasons, and I think I already have a working branch with a possible implementation. I added an |
I opened a PR just for reference, If it's not a problem we can discuss there for any changes / fix 🙂 |
Summary: This PR fixes facebook#30891 This PR is going to add an `accessibilityLanguage` prop to all the available components. This props is currently working only on iOS and should follow the [guidelines of the relative configuration](https://developer.apple.com/documentation/objectivec/nsobject/1615192-accessibilitylanguage). I'm in no way an expert on native programming (especially Objective-C) so I'm open to changes / improvements 🙂 <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [iOS] [Added] - Integrated the `accessibilityLanguage` prop to all the available components. The prop is available for any platform but it will work only on iOS. Pull Request resolved: facebook#33090 Test Plan: This has been tested using both the Simulator, checking for the `Language` attribute, and using a physical device with the Voice Over enabled. <img width="1083" alt="Screenshot 2022-02-11 at 13 17 32" src="https://user-images.githubusercontent.com/5963683/153590415-65fcb4ff-8f31-4a0f-90e5-8eb1aae6aa3d.png"> Reviewed By: philIip Differential Revision: D34523608 Pulled By: rh389 fbshipit-source-id: b5d77fc0b3d76ea8ed8f30c8385459ba98122ff6
Requires API Proposal
This issue may require a new API, or a change to an existing API. An API proposal should be added and discussed before proceeding with implementation. The API proposal can be added in the comments of this issue or linked as a separate issue.
Description
It should be possible to set a specific language for text to be read by VoiceOver. Text to be read is not always the same as the system-wide locale.
React Native version:
v0.63
Expected Behavior
There could be an attribute like "accessibilityLanguage = {...}" which would be set on an applicable type of text.
iOS Details
It seems feasible that the native accessibilityLanguage property could be bridged for applicable components.
The text was updated successfully, but these errors were encountered: