Android: TalBack reads style

未关闭
#59,231 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
1-2 天
新手友好度
50/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
android, react-native

调研方向

Start with the linked React Native issue #56873 and its referenced patch, then use the mandatory reproducer app to confirm the TalkBack behavior on Android. Trace how text styles are exposed to accessibility when the label is recreated after “Increment ID.” Done means TalkBack reads “Hello, world” normally on both visits with “speak text formatting” enabled.

由索引模型根据 Issue 内容生成。

描述

Needs: Triage :mag: Platform: Android
Description

On Android, TalkBack reads the style of the underlying text.
Previously this ticket has been opened about it, without a real fix.
This patch is the only thing that seems to be working fine.

Steps to reproduce
  1. Activate talkback, with verbosity high and enable speak text formatting
  2. Open the repro app
  3. Move on the "Hello, world" label
  4. Hear that it is read as Start 63 pixel, color black...
  5. Move again on "Hello, world" label
  6. Hear that is now read normally
  7. Click on Increment ID
  8. Move on the "Hello, world" label
  9. Hear that Start 63 pixel, color black... starts again
React Native Version

0.87.1

Affected Platforms

Runtime - Android

Output of npx @react-native-community/cli info
System:
  OS: macOS 26.7.1
  CPU: (12) arm64 Apple M3 Pro
  Memory: 208.80 MB / 18.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 24.17.0
    path: /Users/ilteoood/.local/state/fnm_multishells/93663_1792501581240/bin/node
  Yarn:
    version: 1.22.22
    path: /Users/ilteoood/.local/state/fnm_multishells/93663_1792501581240/bin/yarn
  npm:
    version: 11.13.0
    path: /Users/ilteoood/.local/state/fnm_multishells/93663_1792501581240/bin/npm
  Watchman:
    version: 2026.10.12.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/ilteoood/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 27.0
      - iOS 27.1
      - macOS 27.0
      - tvOS 27.0
      - visionOS 27.0
      - watchOS 27.0
  Android SDK: Not Found
IDEs:
  Android Studio: 2026.2 AI-262.9437.185.2621.16467767
  Xcode:
    version: 27.1/27A9275
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.19
    path: /usr/bin/javac
  Ruby:
    version: 3.4.3
    path: /Users/ilteoood/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.2.0
    wanted: 20.2.0
  react:
    installed: 19.2.3
    wanted: 19.2.3
  react-native:
    installed: 0.87.1
    wanted: 0.87.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

info React Native v0.88.0 is now available (your project is running on v0.87.1).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.88.0
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.87.1&to=0.88.0
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".
Stacktrace or Logs
No logs can to share
MANDATORY Reproducer

https://github.com/ilteoood/rn-accessibility-repro

Screenshots and Videos

https://github.com/user-attachments/assets/bb90d5d6-3147-4586-b62c-779a2fdf8b3b

主要语言
C++
星标
127k
派生
25.4k
平均合并
2 天 6 小时
30 天内合并 PR
73

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

react/react-native 的其他 Issue

查看 react/react-native 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。