Configuring views as accessibility elements is easy:

1
2
3
4
5
6
7
8
  public override func view() -> ViewConfiguration? {
    return ViewConfiguration(
      view: UIView.self,
      attributes: ViewOptions(
        isAccessibilityElement: true,
        accessibilityLabel: "Some Label"
      ).viewAttributes())
  }

Edit on GitHub