Determines whether this element should be used as the label in the pair, or the content in the pair.
Instance Method
インスタンスメソッド
accessibility
accessibilityLabeledPair(role:id:in:)
Pairs an accessibility element representing a label with the element for the matching content.
ラベルを表しているあるアクセシビリティ要素をその合致している内容に対する要素と対にします。
Availability 有効性
- iOS 14.0+
- iPadOS 14.0+
- macOS 11.0+
- Mac Catalyst 14.0+
- tvOS 14.0+
- watchOS 7.0+
Technology
- Swift
UI
Declaration 宣言
func accessibilityLabeledPair<ID>(role: AccessibilityLabeledPairRole
, id: ID, in namespace: Namespace
.ID
) -> some View
where ID : Hashable
Parameters パラメータ
role
id
The identifier for the label / content pair. Elements with matching identifiers within the same namespace will be paired together.
namespace
The namespace used to organize label and content. Label and content under the same namespace with matching identifiers will be paired together.
Discussion 議論
Use accessibility
with a role of Accessibility
to identify the label, and a role of Accessibility
to identify the content. This improves the behavior of accessibility features such as VoiceOver when navigating such elements, allowing users to better understand the relationship between them.