accessibilityTextContentType

Sets an accessibility text content type.

View ModifieriOS 15.0+macOS 12.0+tvOS 15.0+watchOS 8.0+accessibilityTextContentType(_:) in SwiftUI

Declaration

React
compose().accessibilityTextContentType(
  value: SwiftUI.AccessibilityTextContentType
)
Swift
nonisolated func accessibilityTextContentType(
    _ value: AccessibilityTextContentType
) -> ModifiedContent<Self, AccessibilityAttachmentModifier>

Parameters

Discussion

Use this modifier to set the content type of this accessibility element. Assistive technologies can use this property to choose an appropriate way to output the text. For example, when encountering a source coding context, VoiceOver could choose to speak all punctuation.

The default content type AccessibilityTextContentType.plain.

AccessibilityTextContentType options.

See also

More in Accessibility.