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

  • hasisAccessibilityElement set to true or

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.

  • An optional accessibilityIdentifier to give the container. Defaults to nil.

    Declaration

    Swift

    public var identifier: String?
  • Declaration

    Swift

    public var wrapped: Element
  • Creates a new AccessibilityContainer wrapping the provided element.

    Declaration

    Swift

    public init(identifier: String? = nil, wrapping element: Element)

Element