Localized text describing to the user what is contained in this additional information entry. For example: “orientation”.
accessibilityCustomContent(_:_:importance:)
Availability 有効性
- iOS 15.0+
- iPadOS 15.0+
- macOS 12.0+
- Mac Catalyst 15.0+
- tvOS 15.0+
- watchOS 8.0+
Technology
- Swift
UI
Declaration 宣言
func accessibilityCustomContent<V>(_ labelKey: LocalizedStringKey
, _ value: V, importance: AXCustomContent
.Importance
= .default) -> ModifiedContent
<Self, AccessibilityAttachmentModifier
> where V : StringProtocol
Parameters パラメータ
labelKey
value
Text value for the additional accessibility information. For example: “landscape.”
importance
Importance of the accessibility information. High-importance information gets read out immediately, while default-importance information must be explicitly asked for by the user.
Discussion 議論
Use this method to add information you want accessibility users to be able to access about this element, beyond the basics of label, value, and hint. For example, accessibility
can be used to add information about the orientation of a photograph, or the number of people found in the picture.
Note 注意
Repeated calls of accessibility
with different labels will create new entries of additional information. Calling accessibility
repeatedly with the same label will instead replace the previous value and importance.