Skip to content

feat(android): expose semantics to the TalkBack screen reader - #376

Open
mfazekas wants to merge 3 commits into
mainfrom
claude/deps-semantics-enabled-modes-18b530
Open

feat(android): expose semantics to the TalkBack screen reader#376
mfazekas wants to merge 3 commits into
mainfrom
claude/deps-semantics-enabled-modes-18b530

Conversation

@mfazekas

@mfazekas mfazekas commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Bumps rive-android to 11.10.0 (adds accessibility semantics) and rive-ios to 6.24.0, and wires the semantics prop (Off / On / Automatic) on the Android new backend. iOS already supported all three modes; the legacy backends still ignore the prop. rive-ios 6.25.0 is tagged but not on CocoaPods trunk.

The SDK only offers semantics through its Compose composable, and its TalkBack host view is Kotlin-internal. RiveSemanticsTextureView.java reaches that host from Java, and RiveReactNativeView mirrors what the composable does on our own render loop (enable, drain after each advance, sync virtual nodes, route actions back, zero-delta frame while paused), copied from RiveSemanticsEffects / DrawRiveFramesEffect in Rive.kt @ 11.10.0.

rive-android needs androidx.core 1.17 (compileSdk 36). The example force-pinned 1.15 to stay on compileSdk 35, which crashed with NoSuchMethodError once semantics were enabled; the pin is removed and the example builds with compileSdk 36. Apps that keep such a pin now get an onError instead of a crash.

Verified on an emulator with tabtest.riv via uiautomator dump: On and Automatic expose the Child/Parent/All nodes with the correct selected state, Off removes them, Off → On re-enables without a remount. The iOS example builds and renders on 6.24.0.

@mfazekas mfazekas changed the title feat(android): expose editor-authored semantics to TalkBack feat(android): expose semantics to the TalkBack screen reader Sep 2, 2026
@mfazekas
mfazekas requested a review from HayesGordon September 2, 2026 13:47
@HayesGordon
HayesGordon requested a balanced review from Copilot September 2, 2026 16:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The library’s default compileSdk remains incompatible with the updated Android runtime.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds TalkBack semantics support to Android’s new backend and updates native runtimes.

Changes:

  • Implements Android semantic-tree synchronization and actions.
  • Adds semantics mode wiring and compatibility handling.
  • Updates runtimes, example SDK configuration, and documentation.
File summaries
File Description
src/specs/RiveView.nitro.ts Documents TalkBack support.
README.md Marks accessibility semantics supported.
package.json Updates native runtime versions.
example/src/demos/SemanticsExample.tsx Extends the demo to TalkBack.
example/android/build.gradle Moves the example to compileSdk 36.
android/src/new/java/com/rive/RiveSemanticsTextureView.java Bridges the internal semantics host.
android/src/new/java/com/rive/RiveReactNativeView.kt Implements semantics lifecycle and rendering.
android/src/new/java/com/margelo/nitro/rive/HybridRiveView.kt Maps the public semantics modes.
Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread package.json
"ios": "6.23.1",
"android": "11.9.1"
"ios": "6.24.0",
"android": "11.10.0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants