[a11y][iOS] Collapsed state ignored by Fabric
未关闭
还没有人认领这个 Issue。
Platform: iOS
Resolution: PR Submitted
Type: New Architecture
- 主要语言
- C++
- 星标
- 127k
- 派生
- 25.3k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 4
描述
Description
On iOS, accessibilityState={{ expanded: true }} works as expected, but accessibilityState={{ expanded: false }} is ignored. That means the collapsed state is not announced by VoiceOver, so users may not know the element can be expanded.
Steps to reproduce
- Build and run the reproducer on the iOS Simulator.
- Open Xcode > Open Developer Tool > Accessibility Inspector.
- Click Select an element to inspect and choose Element 1.
- Verify Value is expanded.
- Click Select an element to inspect and choose Element 2.
- Note Value is None, while it should be collapsed.
React Native Version
0.84.1
Affected Platforms
Runtime - iOS
Areas
Fabric - The New Renderer
Output of npx @react-native-community/cli info
System:
OS: macOS 26.3.1
CPU: (12) x64 Intel(R) Core(TM) i5-10600 CPU @ 3.30GHz
Memory: 74.71 MB / 48.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.13.0
path: /Users/richard/.nvm/versions/node/v22.13.0/bin/node
Yarn:
version: 1.22.22
path: /Users/richard/.nvm/versions/node/v22.13.0/bin/yarn
npm:
version: 10.9.2
path: /Users/richard/.nvm/versions/node/v22.13.0/bin/npm
Watchman:
version: 2025.08.04.00
path: /usr/local/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /Users/richard/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 25.0
- iOS 26.0
- macOS 26.0
- tvOS 26.0
- visionOS 26.0
- watchOS 26.0
Android SDK:
API Levels:
- "31"
- "33"
- "34"
- "35"
- "36"
Build Tools:
- 35.0.0
- 36.0.0
System Images:
- android-31 | Google APIs Intel x86_64 Atom
- android-33 | Google APIs Intel x86_64 Atom
- android-33 | Google Play Intel x86_64 Atom
- android-34 | Google APIs Intel x86_64 Atom
- android-35 | Google APIs Intel x86_64 Atom
- android-36 | Google APIs Intel x86_64 Atom
- android-36 | Google Play Intel x86_64 Atom
Android NDK: Not Found
IDEs:
Android Studio: 2025.1 AI-251.26094.121.2512.13840223
Xcode:
version: 26.0/17A324
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.16
path: /usr/bin/javac
Ruby:
version: 3.3.4
path: /Users/richard/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 20.1.0
wanted: 20.1.0
react:
installed: 19.2.3
wanted: 19.2.3
react-native:
installed: 0.84.1
wanted: 0.84.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Stacktrace or Logs
N/A
MANDATORY Reproducer
https://github.com/QichenZhu/reproducer-react-native-a11y-state
Screenshots and Videos
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
先从链接的 reproducer 开始,并在 iOS Simulator 上运行它,然后使用 Xcode Accessibility Inspector 检查 Element 1 和 Element 2。跟踪 Fabric 在 iOS 上如何处理 accessibilityState 的 expanded 值。完成标准是 accessibilityState={{ expanded: false }} 被报告为 collapsed,并由 VoiceOver 播报。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- ios, react-native
- 领域
- accessibility, mobile
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100