feat(ios): expose editor-authored accessibility semantics to VoiceOver - #344
Merged
Merged
Conversation
Adds an optional semantics view prop (Semantics.Off/On/Automatic, default Off) that maps to RiveUIView.semantics on the experimental iOS backend, so accessibility semantics authored in the Rive editor (roles, labels, selection state) are exposed to VoiceOver. Semantics-only prop changes apply to the live RiveUIView without rebuilding artboard/state machine. Semantics exist in the new Rive runtime only, so the legacy iOS backend accepts the prop and ignores it; Android (both backends) does the same until upstream rive-android ships semantics support. The Semantics example page uses tabtest.riv from rive-runtime's semantic test assets (three tabs with roles and single-selection state). Verified on an iPhone 17 / iOS 26.5 simulator: with semantics On the tabs appear as accessibility buttons (Child / Parent / All, with the selected trait); switching to Off removes them. Known upstream quirk: re-enabling semantics on a live view (Off -> On) does not repopulate elements until the view is remounted - the SDK restarts its semantics manager but no full tree diff is re-delivered.
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.
Adds an optional
semanticsview prop (Semantics.Off/On/Automatic, defaultOff) that maps toRiveUIView.semanticson the experimental iOS backend, exposing accessibility semantics authored in the Rive editor (roles, labels, selection state) to VoiceOver (docs). Semantics-only prop changes are applied to the live view without rebuilding the artboard/state machine.Semantics exist in the new Rive runtime only, so the legacy iOS backend accepts the prop and ignores it; both Android backends do the same until upstream rive-android ships semantics support.
Includes a
Semantics (VoiceOver)example page usingtabtest.rivfrom rive-runtime's semantic test assets. Verified on an iPhone 17 / iOS 26.5 simulator: with semantics on, the three tabs are exposed as accessibility buttons with the selected trait, and switching to off removes them.Known upstream quirk found while verifying: re-enabling semantics on a live view (off → on) restarts the SDK's semantics manager (
Enabling semantics+ diff drains are logged) but the accessibility elements don't repopulate until the view is remounted — looks like the core doesn't re-deliver a full tree diff after a re-enable.