accessibilityRotorEntry

Defines an explicit identifier tying an Accessibility element for this view to an entry in an Accessibility Rotor.

View ModifieriOS 15.0+macOS 12.0+tvOS 15.0+watchOS 8.0+accessibilityRotorEntry(id:in:) in SwiftUI

Declaration

React
compose().accessibilityRotorEntry<ID>({
  id: ID,
  in: string,
})
Swift
nonisolated func accessibilityRotorEntry<ID>(
    id: ID,
    in namespace: Namespace.ID
) -> some View
where ID : Hashable

Parameters

  • options.id*ID

    An arbitrary hashable identifier. Pass this same value

  • options.in*string

Discussion

Use this when creating an AccessibilityRotorEntry without a namespace does not allow SwiftUI to automatically find and reveal the element, or when the Rotor entry should be associated with a sub-element of a complex view generated in a ForEach, for example.

when initializing an AccessibilityRotorEntry. same namespace when initializing an AccessibilityRotorEntry.

See also

More in Accessibility.