accessibilityLinkedGroup(id:in:)
Links multiple accessibility elements so that the user can quickly navigate from one element to another, even when the elements are not near each other in the accessibility hierarchy.
Declaration
nonisolated func accessibilityLinkedGroup<ID>(id: ID, in namespace: Namespace.ID) -> some View where ID : Hashable
Parameters
- id:
A hashable identifier used to separate sets of linked elements within the same namespace. Elements with matching
namespaceandidwill be linked together. - namespace:
The namespace to use to organize linked accessibility elements. All elements marked with
accessibilityLinkin this namespace and with the specifiedidwill be linked together.
Discussion
This can be useful to allow quickly jumping between content in a list and the same content shown in a detail view, for example. All elements marked with accessibilityLinkedGroup with the same namespace and identifier will be linked together.