Skip to content
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

Closed
amarlette opened this issue Feb 4, 2021 · 7 comments
Closed

iOS: Accessibility Language Support #30891

amarlette opened this issue Feb 4, 2021 · 7 comments
Labels
Accessibility Team - Evaluated Accessibility Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Needs: Docs Website PR To encourage the authors to create a website PR for documentation. Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@amarlette
Copy link

amarlette commented Feb 4, 2021

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.

@gioneill gioneill changed the title iOS: Accessibility Language support (different from default locale) iOS: Accessibility Language Support Feb 25, 2021
@gioneill gioneill added the Good first issue Interested in collaborating? Take a stab at fixing one of these issues. label Feb 25, 2021
@inatonix
Copy link

I'd like to tackle on this issue as the first contribution to this repo!

@amarlette amarlette added the Needs: Docs Website PR To encourage the authors to create a website PR for documentation. label Apr 29, 2021
@zersiax
Copy link

zersiax commented Aug 20, 2021

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.

@grgr-dkrk
Copy link
Contributor

I'm also running into this problem. I want to fix it.

@inatonix Are there any updates?

@katimoth
Copy link

Would love to work on this. @grgr-dkrk any recent updates?

@grgr-dkrk
Copy link
Contributor

@katimoth
Thank you, now I'm working on another issue and I'm not working on this one.

@dgopsq
Copy link
Contributor

dgopsq commented Jan 29, 2022

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 accessibilityLanguage prop typed as string to all the most common elements in RN (so, not just to the Text component). This prop is just a bridge to the iOS native property linked in the issue. I am obviously open to changes! Let me know if and when It's ok for you to open a PR 🙂

@dgopsq
Copy link
Contributor

dgopsq commented Feb 11, 2022

I opened a PR just for reference, If it's not a problem we can discuss there for any changes / fix 🙂

Saadnajmi pushed a commit to Saadnajmi/react-native-macos that referenced this issue Jan 15, 2023
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
@facebook facebook locked as resolved and limited conversation to collaborators Mar 7, 2023
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility Team - Evaluated Accessibility Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Needs: Docs Website PR To encourage the authors to create a website PR for documentation. Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants