Skip to content

Android: removing accessibilityValue leaves its text in a Pressable's content description and drops a View's label with it #59536

Closed

Description

@YevheniiKotyrlo

Description

On Android, re-rendering a view with its accessibilityValue removed leaves the content description wrong, so TalkBack announces a value the app removed, or loses the label:

  • A Pressable keeps the removed text: Country, Ukraine stays where Country is expected. Pressable builds accessibilityValue as {max, min, now, text} on every render (Libraries/Components/Pressable/Pressable.js), so the removal reaches native as a map without text, and BaseViewManager.setAccessibilityValue updates the content description only when the map has a text key, which leaves the previous one standing.
  • A plain View loses its label with the value: its content description becomes empty. View sends the removal as null (Libraries/Components/View/View.js), and setAccessibilityValue(null) calls view.setContentDescription(null), which drops the label and the state with it.

Steps to reproduce

  1. Clone the reproducer, then in ReproducerApp: yarn install, cd android && ./gradlew assembleRelease -PreactNativeArchitectures=x86_64 && cd .., adb install -r android/app/build/outputs/apk/release/app-release.apk (the architecture of your device or emulator; I used an Android 16 x86_64 emulator).
  2. Start the app and dump the view tree: adb shell uiautomator dump /sdcard/view.xml && adb pull /sdcard/view.xml before.xml. Both pressable-subject and view-subject read content-desc="Country, Ukraine".
  3. Tap REMOVE THE VALUE, which re-renders both with accessibilityValue undefined (their text changes to "no value"), and dump the view tree again.
  4. Expected: both read content-desc="Country". Seen: pressable-subject reads content-desc="Country, Ukraine", and view-subject reads content-desc="".

React Native Version

0.88.0

Affected Platforms

Runtime - Android, Build - Windows

Output of npx @react-native-community/cli info

System:
  OS: Windows 11 10.0.26300
  CPU: "(32) x64 AMD Ryzen 9 9950X3D 16-Core Processor          "
  Memory: 153.55 GB / 255.67 GB
Binaries:
  Node:
    version: 26.12.1
    path: C:\Program Files\nodejs\node.EXE
  Yarn:
    version: 1.22.22
    path: C:\Users\yevhe.YEVHENII\AppData\Roaming\npm\yarn.CMD
  npm:
    version: 12.2.1
    path: C:\Program Files\nodejs\npm.CMD
  Watchman: Not Found
SDKs:
  Android SDK:
    API Levels:
      - "33"
      - "35"
      - "35"
      - "35"
      - "36"
      - "37"
    Build Tools:
      - 35.0.0
      - 36.0.0
      - 36.1.0
      - 37.0.0
    System Images:
      - android-26 | Google APIs Intel x86_64 Atom
      - android-28 | Google APIs Intel x86_64 Atom
      - android-29 | Google APIs Intel x86_64 Atom
      - android-30 | Google APIs Intel x86_64 Atom
      - android-31 | Google APIs Intel x86_64 Atom
      - android-32 | Google APIs Intel x86_64 Atom
      - android-33 | Google APIs Intel x86_64 Atom
      - android-34 | Google APIs Intel x86_64 Atom
      - android-35 | Google APIs Intel x86_64 Atom
      - android-36.1 | Google Play Intel x86_64 Atom
      - android-36.1 | Pre-Release 16 KB Page Size Google Play Intel x86_64 Atom
      - android-37.0 | Google APIs Intel x86_64 Atom
    Android NDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: AI-262.9437.185.2621.16467767
  Visual Studio: Not Found
Languages:
  Java:
    version: 17.0.20.1
    path: C:\Program Files\Microsoft\jdk-17.0.20.101-hotspot\bin\javac.EXE
  Ruby: Not Found
npmPackages:
  "@react-native-community/cli":
    installed: 20.2.0
    wanted: 20.2.0
  react:
    installed: 19.3.0
    wanted: 19.3.0
  react-native:
    installed: 0.88.0
    wanted: 0.88.0
  react-native-windows: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Stacktrace or Logs

No crash. The two subjects in the view tree before and after the tap (uiautomator dump):
before  resource-id="pressable-subject"  content-desc="Country, Ukraine"
before  resource-id="view-subject"       content-desc="Country, Ukraine"
after   resource-id="pressable-subject"  content-desc="Country, Ukraine"
after   resource-id="view-subject"       content-desc=""

MANDATORY Reproducer

https://github.com/YevheniiKotyrlo/rn-android-accessibility-value-text-removal

Screenshots and Videos

Nothing visible changes beyond the text; the view tree above is what TalkBack reads.

Activity

  1. dave-otf commented on Oct 28, 2026

    @dave-otf

    The two expected results are distinct: when the Pressable text value disappears, its label should remain Country; when the View value is cleared, its label should also remain Country. I would assert both after the rerender, then add a non-empty update case from Ukraine to Canada. That separates stale text, over-clearing, and replacement behavior, with the content-description dump as a concrete check for each path.

  2. added a commit that references this issue on Oct 29, 2026
    25b05ac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions