feat(android): expose semantics to the TalkBack screen reader - #376
Open
mfazekas wants to merge 3 commits into
Open
feat(android): expose semantics to the TalkBack screen reader#376mfazekas wants to merge 3 commits into
mfazekas wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
🟡 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.
| "ios": "6.23.1", | ||
| "android": "11.9.1" | ||
| "ios": "6.24.0", | ||
| "android": "11.10.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps rive-android to 11.10.0 (adds accessibility semantics) and rive-ios to 6.24.0, and wires the
semanticsprop (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.javareaches that host from Java, andRiveReactNativeViewmirrors 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
NoSuchMethodErroronce semantics were enabled; the pin is removed and the example builds with compileSdk 36. Apps that keep such a pin now get anonErrorinstead 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.