[iOS][Accesibility] Accessibility roles and states which are polyfilled by React Native aren't translated to device language
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- react-native
- 领域
- accessibility, mobile
调研方向
先从必需的 reproducer 和相关 issue 43266 开始,然后用英语和波兰语或其他非英语语言复现 VoiceOver 播报。完成的标准是:polyfill 提供的可访问性角色和状态(例如“checkbox”和“checked”)会以设备和 VoiceOver 所选的语言播报,而不是继续使用英语。
由索引模型根据 Issue 内容生成。
描述
Description
This issue is partially related to https://github.com/react/react-native/issues/43266
On React Native 0.85.3 it seems that polyfilled accessibility roles (e.g. checkbox or radio) and states (e.g. expanded, checked, unchecked) are now correctly assigned to the native components and announced by VoiceOver. However, the announcement is correct only in english as despite being localized strings the assigned values aren't correctly translated to any other language
In one of the comments under that issue it's stated that it does work differently in OSS and internal and hasn't been released externally. Is there any plan for it? This issue severely affects accessibility user experience and is rather difficult to spot since I suppose many developers are testing using VoiceOver with english
Steps to reproduce
- Install the provided reproduction application on an iOS device
- Ensure your device language is set to english (incl. VoiceOver)
- Enable VoiceOver and run the application
- Observe how in english custom checkbox component is correctly announced ("one, checkbox, checked")
- Switch device and VoiceOver language to something else than english
- Enable VoiceOver and run the application
- Observe how this time
aria-label("1") is correctly announced in the selected language, but "checkbox" and "checked" is still announced in english
React Native Version
0.85.3
Affected Platforms
Runtime - iOS
Output of npx @react-native-community/cli info
System:
OS: macOS 26.3
CPU: (14) arm64 Apple M4 Pro
Memory: 173.83 MB / 24.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 24.7.0
path: /Users/patrykmleczek/.nvm/versions/node/v24.7.0/bin/node
Yarn:
version: 3.6.4
path: /Users/patrykmleczek/.nvm/versions/node/v24.7.0/bin/yarn
npm:
version: 11.5.1
path: /Users/patrykmleczek/.nvm/versions/node/v24.7.0/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/opt/ruby/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 25.5
- iOS 26.5
- macOS 26.5
- tvOS 26.5
- visionOS 26.5
- watchOS 26.5
Android SDK:
API Levels:
- "31"
- "33"
- "34"
- "36"
Build Tools:
- 30.0.3
- 31.0.0
- 33.0.0
- 33.0.1
- 34.0.0
- 35.0.0
- 36.0.0
System Images:
- android-33 | Google APIs ARM 64 v8a
- android-34 | Google APIs ARM 64 v8a
- android-34 | Google APIs Intel x86_64 Atom
- android-34 | Google Play ARM 64 v8a
- android-36 | Google APIs ARM 64 v8a
- android-36 | Google Play ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2025.1 AI-251.27812.49.2514.14217341
Xcode:
version: 26.5/17F42
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.17
path: /opt/homebrew/opt/openjdk@17/bin/javac
Ruby:
version: 3.4.7
path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 19.2.3
wanted: 19.2.3
react-native:
installed: 0.85.3
wanted: 0.85.3
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Stacktrace or Logs
No crash
MANDATORY Reproducer
https://github.com/pmleczek/accessibility-translation-issue-repro
Screenshots and Videos
Correct behavior (with english):
https://github.com/user-attachments/assets/60a76149-ffa1-45a8-b4ac-d6c185d56ab6
Incorrect behavior (on example of polish language) - still reads english words for "checkbox" and "checked":
https://github.com/user-attachments/assets/cad73311-ea19-473a-ae75-e6a61c3593c0
- 主要语言
- C++
- 星标
- 127k
- 派生
- 25.3k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 4
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
react/react-native 的其他 Issue
-
Needs: Triage :mag:
难度 2/5 1-3 小时 新手友好度 82/100
react/react-native#58565 · 1 条评论 · 2 个 reaction ·
-
Needs: Author Feedback Needs: Repro
难度 2/5 1-3 小时 新手友好度 88/100
react/react-native#58555 · 4 条评论 · 1 个 reaction ·
-
Needs: Attention Needs: Repro
难度 2/5 1-3 小时 新手友好度 85/100
react/react-native#58526 · 2 条评论 ·
-
Needs: Author Feedback Needs: Repro
难度 2/5 1-3 小时 新手友好度 85/100
react/react-native#58448 · 1 条评论 ·
-
Needs: Attention Needs: Repro
难度 2/5 半天 新手友好度 82/100
react/react-native#58441 · 2 条评论 ·
查看 react/react-native 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
gazebosim/gz-sensors#662 · 1 条评论 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 76/100
-
comp-datalake
难度 2/5 1-3 小时 新手友好度 88/100
ClickHouse/ClickHouse#121222 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
LadybirdBrowser/ladybird#12123 ·