don't traverse a view's subviews if the view in question is accessibleElement.
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
d06fa28a54
commit
f0d0c5638c
@ -56,9 +56,10 @@ extension UIView {
|
|||||||
for subview in view.subviews {
|
for subview in view.subviews {
|
||||||
if subview.isAccessibilityElement && subview.isVisibleOnScreen {
|
if subview.isAccessibilityElement && subview.isVisibleOnScreen {
|
||||||
elements.append(subview)
|
elements.append(subview)
|
||||||
}
|
} else {
|
||||||
elements.append(contentsOf: gatherAccessibilityElements(from: subview))
|
elements.append(contentsOf: gatherAccessibilityElements(from: subview))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return elements
|
return elements
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user