Repository navigation
Android: removing accessibilityValue leaves its text in a Pressable's content description and drops a View's label with it #59536
Copy link
Copy link
Closed
Description
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
Pressablekeeps the removed text:Country, Ukrainestays whereCountryis expected.PressablebuildsaccessibilityValueas{max, min, now, text}on every render (Libraries/Components/Pressable/Pressable.js), so the removal reaches native as a map withouttext, andBaseViewManager.setAccessibilityValueupdates the content description only when the map has atextkey, which leaves the previous one standing. - A plain
Viewloses its label with the value: its content description becomes empty.Viewsends the removal asnull(Libraries/Components/View/View.js), andsetAccessibilityValue(null)callsview.setContentDescription(null), which drops the label and the state with it.
Steps to reproduce
- 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). - Start the app and dump the view tree:
adb shell uiautomator dump /sdcard/view.xml && adb pull /sdcard/view.xml before.xml. Bothpressable-subjectandview-subjectreadcontent-desc="Country, Ukraine". - Tap REMOVE THE VALUE, which re-renders both with
accessibilityValueundefined (their text changes to "no value"), and dump the view tree again. - Expected: both read
content-desc="Country". Seen:pressable-subjectreadscontent-desc="Country, Ukraine", andview-subjectreadscontent-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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
dave-otf commentedon Oct 28, 2026
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.
Rebuild the content description when accessibilityValue is removed on…