Repository navigation
Description
Description
On Android, with the enableAccessibilityOrder feature flag on, a view that experimental_accessibilityOrder names is missing from the accessibility tree when it is actionable but not focusable, for example a View with accessible={false}, a label and the activate action. Its children take its place in the tree, so a screen reader reaches the texts inside it one by one and never the view with its label and its action. The same view outside an order is a node of the tree.
The order adds a named view as an element only when view.isFocusable holds, and otherwise adds its children (ReactViewGroup.kt L1096-L1104). React Native's own accessibility delegate takes a view as an element when it is screen-reader focusable or actionable: clickable, long-clickable, focusable, or offering the click, long-click or focus action (ReactAccessibilityDelegate.kt L888-L925). #59048 widens the order's rule to isFocusable || isScreenReaderFocusable, which still leaves out the clickable and action cases.
Steps to reproduce
The reproducer turns on enableAccessibilityOrder in MainApplication.kt and renders two identical rows, each a View with accessible={false}, an accessibilityLabel and accessibilityActions={[{ name: 'activate' }]}, holding two texts. "row without order" sits in a plain container; "row in order" sits in a container whose experimental_accessibilityOrder is ['row-in-order'], the row's nativeID.
- Build and install the release APK:
cd ReproducerApp && yarn install && cd android && ./gradlew assembleRelease && adb install -r app/build/outputs/apk/release/app-release.apk. - Open the app and read the tree a screen reader gets:
adb shell uiautomator dump --compressed /sdcard/tree.xml && adb exec-out cat /sdcard/tree.xml.
Or run ./reproduce.sh with one Android device attached: it builds and installs the app, starts it and prints the nodes with a text or a label from uiautomator dump --compressed. It exits 1 while "row in order" is missing and its texts take its place although "row without order" is a node.
Expected: "row in order" is a node holding its two texts, as "row without order" is, with its label and its click action.
Seen: "row in order" is not in the tree; "third text" and "fourth text" sit directly in its container.
React Native Version
0.90.0-nightly-20261120-bbfd39149
Affected Platforms
Runtime - Android
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: 148.10 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\<user>\AppData\Roaming\npm\yarn.CMD
npm:
version: 12.2.1
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
Versions:
- 10.0.19041.0
- 10.0.26100.0
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: 21.0.0-alpha.1
wanted: 21.0.0-alpha.1
react:
installed: 19.3.0
wanted: 19.3.0
react-native:
installed: 0.90.0-nightly-20261120-bbfd39149
wanted: 0.90.0-nightly-20261120-bbfd39149
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
./reproduce.sh at the reproducer's 992fef8, on an Android 15 emulator; no error is logged:
device: sdk_gphone64_x86_64, Android 15 (API 35), x86_64
react-native 0.90.0-nightly-20261120-bbfd39149, enableAccessibilityOrder on (MainApplication.kt)
== ./gradlew :app:assembleRelease -PreactNativeArchitectures=x86_64
== the accessibility tree a screen reader reads (uiautomator dump --compressed), nodes with a text or a label
text "Both rows offer the activate action. The second sits in a container whose accessibility order names it."
content-desc "row without order"
text "first text"
text "second text"
text "third text"
text "fourth text"
SUMMARY: "row in order", which the order names, is not a node of the tree, and its texts take its place; "row without order", the same row outside an order, is a node
MANDATORY Reproducer
https://github.com/YevheniiKotyrlo/rn-accessibility-order-actionable-child
Screenshots and Videos
No response
Activity