Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5fbf18f99dea6cc570652e019eb1259779ddceb8
https://github.com/WebKit/WebKit/commit/5fbf18f99dea6cc570652e019eb1259779ddceb8
Author: Justin Mann <[email protected]>
Date: 2026-10-14 (Wed, 14 Oct 2026)
Changed paths:
A
LayoutTests/accessibility/isolated-tree/local-frame-presentational-iframe-nested-content-expected.txt
A
LayoutTests/accessibility/isolated-tree/local-frame-presentational-iframe-nested-content.html
A
LayoutTests/accessibility/isolated-tree/local-frame-presentational-iframe-role-removed-expected.txt
A
LayoutTests/accessibility/isolated-tree/local-frame-presentational-iframe-role-removed.html
A
LayoutTests/accessibility/mac/local-frame-presentational-iframe-nested-content-expected.txt
A
LayoutTests/accessibility/mac/local-frame-presentational-iframe-nested-content.html
A
LayoutTests/accessibility/mac/local-frame-presentational-iframe-role-removed-expected.txt
A
LayoutTests/accessibility/mac/local-frame-presentational-iframe-role-removed.html
A
LayoutTests/accessibility/resources/presentational-iframe-nested-middle.html
M Source/WebCore/accessibility/AXCoreObject.cpp
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/accessibility/AccessibilityScrollView.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp
Log Message:
-----------
AX: VoiceOver cannot reach the content of an iframe nested inside a
presentational iframe
https://bugs.webkit.org/show_bug.cgi?id=327457
rdar://189901948
Reviewed by Tyler Wilcock.
When a presentational iframe (role="none" or role="presentation") hosts a
document that itself
contains an iframe, the nested iframe's content was missing from the AT-exposed
accessibility
tree: VoiceOver could not reach it at all, even though it was rendered.
315933@main hoisted the content of a presentational local iframe into the host
frame, but only
handled one level of frames, on both the parent side and the children side:
- AccessibilityScrollView::crossFrameParentObject() resolved the parent of a
frame root whose owner
element is ignored with parentObjectUnignored(), which never leaves the
owner's frame. When that
frame's root is itself ignored (because its own owner is presentational), the
walk ran off the top
of the frame and returned null, so the nested frame root had no parent even
though the host listed
it as a child. Use crossFrameParentObjectUnignored() instead, which crosses
frame boundaries.
- AXCoreObject::crossFrameUnignoredChildren() hoisted the ignored frame root's
children as-is, so a
local frame among them (the nested iframe) was exposed instead of its frame
root. In the isolated
tree that object has no platform wrapper, so it was counted as a child but
could not be returned.
Resolve nested cross-frame children recursively when hoisting.
Removing role="none" from such an iframe after load also left a stale tree. A
hosted document's web
area is ignored when its frame owner element is presentational
(webAreaIsPresentational()), and the
frame root's ignored state follows the web area's. Both live in the hosted
frame's own AXObjectCache,
but AXObjectCache::handleRoleChanged() only updated the owner's cache, so the
hosted web area and root
stayed ignored and the frame's content stayed hoisted into the parent instead
of being exposed as a
frame again.
When the role of a frame owner element changes, recompute the ignored state of
the hosted frame's web
area and root. In the isolated tree, the roots of frames nested in the hosted
document also cache their
cross-frame parent, which may have been resolved through the formerly ignored
root, so queue an update
of that cached parent for them too. AXIsolatedTree::updateNodeProperties() had
no way to refresh it, since
CrossFrameParentFrameID and CrossFrameParentAXID were only set when an isolated
object is created, so add
that rather than queueing a full node update.
*
LayoutTests/accessibility/isolated-tree/local-frame-presentational-iframe-nested-content-expected.txt:
Added.
*
LayoutTests/accessibility/isolated-tree/local-frame-presentational-iframe-nested-content.html:
Added.
*
LayoutTests/accessibility/isolated-tree/local-frame-presentational-iframe-role-removed-expected.txt:
Added.
*
LayoutTests/accessibility/isolated-tree/local-frame-presentational-iframe-role-removed.html:
Added.
*
LayoutTests/accessibility/mac/local-frame-presentational-iframe-nested-content-expected.txt:
Added.
*
LayoutTests/accessibility/mac/local-frame-presentational-iframe-nested-content.html:
Added.
*
LayoutTests/accessibility/mac/local-frame-presentational-iframe-role-removed-expected.txt:
Added.
*
LayoutTests/accessibility/mac/local-frame-presentational-iframe-role-removed.html:
Added.
* LayoutTests/accessibility/resources/presentational-iframe-nested-middle.html:
Added.
* Source/WebCore/accessibility/AXCoreObject.cpp:
(WebCore::appendCrossFrameContent):
(WebCore::AXCoreObject::crossFrameUnignoredChildren):
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::recomputeIsIgnoredForHostedFrameRoot):
(WebCore::AXObjectCache::handleRoleChanged):
* Source/WebCore/accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::crossFrameParentObject const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateNodeProperties):
Canonical link: https://commits.webkit.org/323749@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications