Closed onato closed 2 years ago
I managed to get it to work with a dirty hack. I replaced the root node with this one and added my UIView
subclass to additionalViews
.
Is there a cleaner/supported way to do this?
class AccessableDisplayNode: ASDisplayNode {
var additionalViews: [UIView] = []
override var accessibilityElements: [Any]? {
get {
(super.accessibilityElements ?? []) + additionalViews
}
set {
super.accessibilityElements = newValue
}
}
}
I have a floating UI element that is built with UIKit. It is in an ASDKViewController added to the view. Currently, it is not accessible because Texture seems to be managing the accessibility elements and is not expecting this use case. I'm looking for the expected and supported way to implement this.
If the UITextView has no Texture element underneath, it is accessible.
This also works with a UITableView under the UITextView.
When I add an ASTableView, the UITextView becomes inaccessable.
I have created a minimal example. I would like the UITextField in ViewController.swift to be accessible with the Accessibility Inspector.
XibTest.zip