Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4417bb5d1534ec7403480e529f8adcdbaa81cee4
https://github.com/WebKit/WebKit/commit/4417bb5d1534ec7403480e529f8adcdbaa81cee4
Author: Tyler Wilcock <[email protected]>
Date: 2026-07-17 (Fri, 17 Jul 2026)
Changed paths:
M Source/WebCore/accessibility/AXObjectCache.cpp
Log Message:
-----------
AX: Web content is empty after navigation because the new cache's isolated
tree is never built
https://bugs.webkit.org/show_bug.cgi?id=319702
rdar://182544199
Reviewed by Dominic Mazzoni.
When accessibility is running off the main thread (AXThread mode) and a
navigation
creates a new AXObjectCache, nothing guarantees that cache's isolated tree ever
gets
built. VoiceOver's off-main-thread root request in WKAccessibilityWebPageObject
keeps
serving the previous document's now-stale tree (via the m_isolatedTree weak
pointer),
so it returns early and never routes to the main thread to call
getOrCreateIsolatedTree()
on the new cache. transitionToAXThreadModeIfNeeded() builds trees for all
existing
caches, but only once at the transition, so caches created by later navigations
are not
covered. The result is that VoiceOver is left on empty web content until some
later
main-thread accessibility request happens to build the tree, which may never
happen.
Fix this by proactively queueing the isolated tree build from the AXObjectCache
constructor when we are already in AXThread mode. The build is queued on the
existing
build timer rather than run synchronously because the cache is not yet
installed on its
Document -- Document::axObjectCache() assigns m_axObjectCache only after the
constructor
returns, so building now would re-enter Document::axObjectCache() and construct
a second
cache.
Test clients are excluded: getOrCreateIsolatedTree() builds their tree
synchronously on
request and never uses this timer, so starting it here would build a duplicate
tree.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::AXObjectCache):
Canonical link: https://commits.webkit.org/317449@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications