AccessibilityContainer
public struct AccessibilityContainer : Element
Acts as an accessibility container for any accessible subviews.
Accessible subviews are found using the following algorithm:
Recurse subviews until a view is found that either
- has
isAccessibilityElementset totrueor
If an accessibility element is found, we add it to the accessibilityElements
and terminate the search down that branch. If a container is found,
the elements returned from the container are added to the accessibilityElements
and the search down that branch is also terminated.
-
Declaration
Swift
public enum ContainerType -
indicates the type of content in a data-based container.
Declaration
Swift
public var containerType: ContainerType -
An optional
accessibilityIdentifierto give the container. Defaults tonil.Declaration
Swift
public var identifier: String? -
An optional
accessibilityLabelto give the container. Defaults tonil.Declaration
Swift
public var label: String? -
An optional
accessibilityValueto give the container. Defaults tonil.Declaration
Swift
public var value: String? -
Declaration
Swift
public var wrapped: Element -
Creates a new
AccessibilityContainerwrapping the provided element.Declaration
Swift
public init( containerType: AccessibilityContainer.ContainerType = .none, label: String? = nil, value: String? = nil, identifier: String? = nil, wrapping element: Element )
-
Declaration
Swift
public var content: ElementContent { get } -
Declaration
Swift
public func backingViewDescription(with context: ViewDescriptionContext) -> ViewDescription?
View on GitHub
AccessibilityContainer Structure Reference