Skip to content

AX: Enable ACCESSIBILITY_LOCAL_FRAME on all Apple platforms#62848

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
hoffmanjoshua:eng/AX-Enable-ACCESSIBILITY_LOCAL_FRAME-on-all-Apple-platforms
Apr 16, 2026
Merged

AX: Enable ACCESSIBILITY_LOCAL_FRAME on all Apple platforms#62848
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
hoffmanjoshua:eng/AX-Enable-ACCESSIBILITY_LOCAL_FRAME-on-all-Apple-platforms

Conversation

@hoffmanjoshua
Copy link
Copy Markdown
Contributor

@hoffmanjoshua hoffmanjoshua commented Apr 15, 2026

220fa2d

AX: Enable ACCESSIBILITY_LOCAL_FRAME on all Apple platforms
https://bugs.webkit.org/show_bug.cgi?id=312412
rdar://174864389

Reviewed by Tyler Wilcock.

This PR enables ACCESSIBILITY_LOCAL_FRAME on all Apple/Cocoa platforms.

There are some text and behavior fixes included that were required to
keep all layout tests passing:
- Viewport vs web area positioning: with ACCESSIBILITY_LOCAL_FRAME, both
the scroll area and web area had the same position, both accounting for
scroll. But, our prior behavior returned the position of the scroll view
as its viewport position. This PR updates that by removing the scroll
position when computing it's frame.
- There was sometimes a race where the frame geometry arrived before a tree
was stored. The fix for this is to only update the frame geometry after
we store the tree, to prevent this.
- When we change accessibility mode from off to an on state, we now eagerly
update all frame geometries
- webkit-scrollarea-position.html was updated to our modern style, with
more resillient expectations.
- platform/mac-wk2/TestExpectations was updated to skip relative frame-
related tests, which are not supported with ACCESSIBILITY_LOCAL_FRAME.

* LayoutTests/accessibility/mac/webkit-scrollarea-position-expected.txt:
* LayoutTests/accessibility/mac/webkit-scrollarea-position.html:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::setFrameGeometry):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::convertFrameToSpace const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::convertFrameToSpace const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::createEmpty):
(WebCore::AXIsolatedTree::create):
(WebCore::AXIsolatedTree::setFrameGeometry):
(WebCore::AXIsolatedTree::updateFrameGeometryAndScrollPositionIfNeeded):
(WebCore::AXIsolatedTree::updateRootScreenRelativePosition):
(WebCore::AXIsolatedTree::applyPendingChangesLocked):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:
(WebCore::AXIsolatedTree::frameScrollPosition const):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setAccessibilityMode):

Canonical link: https://commits.webkit.org/311369@main

8537c12

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win ⏳ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ✅ 🧪 win-tests ⏳ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe ⏳ 🛠 vision-apple
✅ 🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-debug-arm64 ✅ 🛠 ios-safer-cpp ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 jsc-armv7
✅ 🛠 tv ✅ 🛠 mac-safer-cpp ✅ 🧪 jsc-armv7-tests
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@hoffmanjoshua hoffmanjoshua requested a review from cdumez as a code owner April 15, 2026 21:03
@hoffmanjoshua hoffmanjoshua self-assigned this Apr 15, 2026
@hoffmanjoshua hoffmanjoshua added the Accessibility For bugs related to accessibility. label Apr 15, 2026
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Apr 15, 2026
@hoffmanjoshua hoffmanjoshua removed the merging-blocked Applied to prevent a change from being merged label Apr 15, 2026
@hoffmanjoshua hoffmanjoshua force-pushed the eng/AX-Enable-ACCESSIBILITY_LOCAL_FRAME-on-all-Apple-platforms branch from 87067d0 to 163d87f Compare April 15, 2026 21:14
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Apr 15, 2026
@hoffmanjoshua hoffmanjoshua removed the merging-blocked Applied to prevent a change from being merged label Apr 16, 2026
@hoffmanjoshua hoffmanjoshua force-pushed the eng/AX-Enable-ACCESSIBILITY_LOCAL_FRAME-on-all-Apple-platforms branch from 163d87f to 8537c12 Compare April 16, 2026 00:43
@hoffmanjoshua hoffmanjoshua added the merge-queue Applied to send a pull request to merge-queue label Apr 16, 2026
https://bugs.webkit.org/show_bug.cgi?id=312412
rdar://174864389

Reviewed by Tyler Wilcock.

This PR enables ACCESSIBILITY_LOCAL_FRAME on all Apple/Cocoa platforms.

There are some text and behavior fixes included that were required to
keep all layout tests passing:
- Viewport vs web area positioning: with ACCESSIBILITY_LOCAL_FRAME, both
the scroll area and web area had the same position, both accounting for
scroll. But, our prior behavior returned the position of the scroll view
as its viewport position. This PR updates that by removing the scroll
position when computing it's frame.
- There was sometimes a race where the frame geometry arrived before a tree
was stored. The fix for this is to only update the frame geometry after
we store the tree, to prevent this.
- When we change accessibility mode from off to an on state, we now eagerly
update all frame geometries
- webkit-scrollarea-position.html was updated to our modern style, with
more resillient expectations.
- platform/mac-wk2/TestExpectations was updated to skip relative frame-
related tests, which are not supported with ACCESSIBILITY_LOCAL_FRAME.

* LayoutTests/accessibility/mac/webkit-scrollarea-position-expected.txt:
* LayoutTests/accessibility/mac/webkit-scrollarea-position.html:
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::setFrameGeometry):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::convertFrameToSpace const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::convertFrameToSpace const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::createEmpty):
(WebCore::AXIsolatedTree::create):
(WebCore::AXIsolatedTree::setFrameGeometry):
(WebCore::AXIsolatedTree::updateFrameGeometryAndScrollPositionIfNeeded):
(WebCore::AXIsolatedTree::updateRootScreenRelativePosition):
(WebCore::AXIsolatedTree::applyPendingChangesLocked):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:
(WebCore::AXIsolatedTree::frameScrollPosition const):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setAccessibilityMode):

Canonical link: https://commits.webkit.org/311369@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/AX-Enable-ACCESSIBILITY_LOCAL_FRAME-on-all-Apple-platforms branch from 8537c12 to 220fa2d Compare April 16, 2026 15:08
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 311369@main (220fa2d): https://commits.webkit.org/311369@main

Reviewed commits have been landed. Closing PR #62848 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 220fa2d into WebKit:main Apr 16, 2026
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accessibility For bugs related to accessibility.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants