Repository navigation
feat(android): add TalkBack accessibility via accesskit_android (#2697) - #2713
Merged
Merged
Conversation
Hona
force-pushed
the
feat/android-talkback
branch
2 times, most recently
from
November 28, 2026 02:46
856533e to
ee0ae74
Compare
Hona
force-pushed
the
feat/android-talkback
branch
from
November 28, 2026 02:51
ee0ae74 to
6b7940f
Compare
Closed
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.
Implements Android TalkBack accessibility for
dev.rune.RuneView.Summary
crates/rune/Cargo.toml,crates/rune/src/a11y/android/,crates/rune/src/platform/android/a11y.rs): adds optionalaccesskit_android = "0.9.1"under theaccessibilityfeature ontarget_os = "android", wired through the existingAccessibilityLinkon the UI thread (createAccessibilityNodeInfo,findFocus,performAction, and touch-explorationdispatchHoverEvent). AllQueuedEvents::raisecalls run strictly after releasing the thread-localHOSTborrow so synchronous framework callbacks cannot re-enterRefCell. All JNI native methods remain registered with safe no-op fallbacks whenfeature = "accessibility"is disabled.crates/rune/android/src/main/java/dev/rune/RuneView.kt): strips focusable/clickable/accessibility-focus actions fromHOST_VIEW_ID(-1) andonInitializeAccessibilityNodeInfo, moves any root title into API 28+paneTitle, and returnsnullfromfindFocus(FOCUS_INPUT)while keyboard focus sits on the rootWindowso TalkBack walks the virtual subtree instead of stopping on the view itself.screenReaderFocusable&isHeadinggrouping (crates/rune/src/a11y/android/focusable.rs): follows the per-role rule endorsed in Android: TalkBack #2697—ListItem,Article,Heading, andParagraphstay a single swipe stop (withisHeading = trueonHeading, API 28+) without splitting plain-text children, while standaloneLabelleaves (and standalone labelledImageleaves) outside grouping ancestors or leaf controls getscreenReaderFocusable = trueso TalkBack does not merge a scroll viewport's content into one announcement.crates/rune/src/a11y/android/throttle.rs): explicitRest/Cooldown/Holdingstate machine (rune::machine) that syncs immediately at rest, caps syncs to at most once per 100 ms while any viewport has active scroll motion (RuntimeCore::a11y_scroll_active), flushes at once on the first resting frame, and schedules a fencedAttemptwake when frames stop.Verification
cargo test -p rune --lib a11y::android): 10/10 passing (5 scroll-pacing tests covering rest, hold, 1 s 120 Hz fling, resting-frame flush, and scheduled/stale wakes; 5 per-role focusability andRuntime::accessibility_tree()tests).cargo test -p rune --lib platform::android::machine): passing.cargo check -p rune --no-default-features: passing.aarch64-linux-android,x86_64-linux-androidwithrune/accessibility) and Kotlin/APK compilation (RuneView.ktviakotlinc+d8): verified by theandroidCI workflow.Fixes #2697