iOS Accessibility Value Out of Sync
还没有人认领这个 Issue。
- 主要语言
- C++
- 星标
- 127k
- 派生
- 25.3k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 4
描述
Description
On iOS it seems that after an accessibility action is triggered the value of accessibility value is read an arbitrary amount of time later. This can lead to VoiceOver reading the previous value again rather than the new value.
This means that sometimes the value will be read correctly, depending on how quickly react native renders the updated accessibility action.
However in my moderately complex RN project I was unable to reliably get everything rendering quickly enough. Even when Flipper said the component in question was rendering in a few ms the bug would still sometimes occur (about 1 in 20 actions).
Note: On Android, TalkBack waits any length of time before reading the updated value. Even an artificial of delay of 500ms will still be read correctly.
Version
0.68.5
Output of npx react-native info
System:
OS: macOS 12.6
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 37.62 MB / 32.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
Watchman: 2022.06.06.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK:
API Levels: 30, 31
Build Tools: 30.0.2, 31.0.0, 33.0.1
System Images: android-24 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-31 | Google APIs Intel x86 Atom_64, android-31 | Google Play Intel x86 Atom_64
Android NDK: Not Found
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9123335
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 18.0.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.5 => 0.68.5
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Accessible components with the following properties:
accessibleRole="adjustable"accessibilityActionsfor increment and decrementaccessibilityValuewith text property set
In an app where the component is not guaranteed to render quickly enough.
Running with VoiceOver on iOS (Reading speed didn't seem to change the issue)
Snack, code example, screenshot, or link to a repository
https://snack.expo.dev/@scarlin/ios-accessibility-value-bug-demo
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先使用 VoiceOver 运行链接的 Snack 复现,并关注使用 accessibilityActions 和 accessibilityValue 文本属性的可调节组件。跟踪 React Native 如何处理 iOS 可访问性操作以及后续的值更新;当 VoiceOver 能够在递增和递减操作后可靠地读出更新后的值时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- react-native
- 领域
- accessibility, mobile-dev
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100