Semantics is currently only available in Early Access. Runtime support is in development or released as experimental.Have feedback? Join the Early Access community to share your thoughts and help shape the feature.
Overview
In the Rive Editor, you can add semantic meaning to certain elements of your graphic-roles such as button, checkbox, tab, image, list, dialog, and more. Alongside these roles, you can add associated labels, values, states, and actions. These settings vary per role. At runtime, the New Runtime reads those semantics from the running state machine and exposes them to VoiceOver as the view’saccessibilityElements, keeping them up to date as the state machine advances.
Semantics must be defined in the editor to have any effect. If an element has no semantics, it is not exposed to screen readers, regardless of the mode you set. See Feature Support for which runtimes currently support semantics.
Availability
Semantics are available in the New Runtime only (not the Legacy Runtime), on every Apple platform the runtime supports except macOS (AppKit):Semantics modes
Semantics are controlled by theSemantics enum, which sets the VoiceOver integration mode for a Rive view:
For most apps, prefer
.automatic — it keeps the accessibility tree in sync only while VoiceOver is active, avoiding unnecessary work when it isn’t.
Usage
Set the semantics mode on the view (UIKit) or with the.semantics(_:) modifier (SwiftUI).