SIGN IN SIGN UP

AX: iOS VoiceOver can't swipe past the last element inside iframes or render a cursor for iframe content

https://bugs.webkit.org/show_bug.cgi?id=319459
rdar://179279930

Reviewed by Chris Fleizach.

With ENABLE(ACCESSIBILITY_LOCAL_FRAME), each frame gets its own AXObjectCache and
an iframe's root AccessibilityScrollView reports isRoot() == true, so its
parentObject() returns null. On iOS, -[WebAccessibilityObjectWrapper
accessibilityContainer] climbed the tree with the non-cross-frame
parentObjectUnignored(), which therefore dead-ended at the iframe root

This broken link means it can neither advance past the last iframe element
nor resolve the view/window needed to draw its focus cursor.

Fix accessibilityContainer to ascend with crossFrameParentObjectUnignored(),
matching macOS. It crosses the local frame boundary at the iframe root and
behaves identically to parentObjectUnignored() elsewhere and when the flag is
off.

* LayoutTests/accessibility/ios-simulator/iframe-exit-traversal-expected.txt: Added.
* LayoutTests/accessibility/ios-simulator/iframe-exit-traversal.html: Added.
* Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityContainer]):

Canonical link: https://commits.webkit.org/317285@main
T
Tyler Wilcock committed
a90848164db6573df50ccfbb8e145f8e03c3c216
Parent: 71159f6