Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: bcf7cbeeebf02dc79ab17e0aed58ecf87e822c62
https://github.com/WebKit/WebKit/commit/bcf7cbeeebf02dc79ab17e0aed58ecf87e822c62
Author: Tyler Wilcock <[email protected]>
Date: 2025-12-04 (Thu, 04 Dec 2025)
Changed paths:
A LayoutTests/accessibility/list-marker-text-stitching-expected.txt
A LayoutTests/accessibility/list-marker-text-stitching.html
M LayoutTests/platform/glib/TestExpectations
M LayoutTests/platform/ios/TestExpectations
A
LayoutTests/platform/ios/accessibility/list-marker-text-stitching-expected.txt
M LayoutTests/resources/accessibility-helper.js
M Source/WebCore/Headers.cmake
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/accessibility/AXCoreObject.cpp
M Source/WebCore/accessibility/AXCoreObject.h
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/accessibility/AXObjectCache.h
A Source/WebCore/accessibility/AXStitchGroup.h
M Source/WebCore/accessibility/AXStitchUtilities.cpp
M Source/WebCore/accessibility/AXStitchUtilities.h
M Source/WebCore/accessibility/AXUtilities.cpp
M Source/WebCore/accessibility/AXUtilities.h
M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
M Source/WebCore/accessibility/AccessibilityNodeObject.h
M Source/WebCore/accessibility/AccessibilityObject.h
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
M Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h
M Source/WebCore/rendering/RenderBlock.h
Log Message:
-----------
AX: List markers should be stitched into adjacent text in the accessibility
tree
https://bugs.webkit.org/show_bug.cgi?id=303552
rdar://165841939
Reviewed by Joshua Hoffman.
One common complaint is that list markers are an extra navigation stop in many
assistive technologies like VoiceOver.
This commit fixes that issue by stitching the list marker with adjacent text.
Mechanically, this required some refactoring, since the prior implementation of
stitching assumed that the first
member of a stitch group was always the representative in the accessibility
tree, and that it had a node. This
is not true when considering list markers, which are generally first in the
inline layout tree (which is what we
walk to build stitch groups), and do not have an associated node.
Fix this by creating a new AXStitchGroup class that denotes the ID of the
group's representative, and handle the case
where element's behind the representative may have text or geometry to
contribute to the serving of our accessibility APIs.
Test: accessibility/list-marker-text-stitching.html
* LayoutTests/accessibility/list-marker-text-stitching-expected.txt: Added.
* LayoutTests/accessibility/list-marker-text-stitching.html: Added.
* LayoutTests/platform/glib/TestExpectations: Skip new test.
* LayoutTests/platform/ios/TestExpectations: Enable new test.
*
LayoutTests/platform/ios/accessibility/list-marker-text-stitching-expected.txt:
Added.
* LayoutTests/resources/accessibility-helper.js:
* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/accessibility/AXCoreObject.cpp:
(WebCore::AXCoreObject::stitchGroupFromGroups const):
(WebCore::AXCoreObject::stitchStateFromGroups const): Deleted.
* Source/WebCore/accessibility/AXCoreObject.h:
(WebCore::AXCoreObject::hasStitchableRole const):
(WebCore::AXCoreObject::stitchGroup const):
(WebCore::AXCoreObject::stitchedIntoID const):
(WebCore::AXCoreObject::StitchState::StitchState): Deleted.
(WebCore::AXCoreObject::stitchState const): Deleted.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::stitchGroupsOwnedBy):
* Source/WebCore/accessibility/AXObjectCache.h:
* Source/WebCore/accessibility/AXStitchGroup.h: Copied from
Source/WebCore/accessibility/AXStitchUtilities.h.
(WebCore::AXStitchGroup::AXStitchGroup):
(WebCore::AXStitchGroup::isEmpty const):
(WebCore::AXStitchGroup::isValid const):
(WebCore::AXStitchGroup::members const):
(WebCore::AXStitchGroup::representativeID const):
* Source/WebCore/accessibility/AXStitchUtilities.cpp:
* Source/WebCore/accessibility/AXStitchUtilities.h:
* Source/WebCore/accessibility/AXUtilities.cpp:
(WebCore::lastNode):
(WebCore::lastObject): Deleted.
* Source/WebCore/accessibility/AXUtilities.h:
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::stitchGroups const):
(WebCore::AccessibilityNodeObject::stitchGroup const):
(WebCore::AccessibilityNodeObject::stringValue const):
(WebCore::AccessibilityNodeObject::stitchState const): Deleted.
* Source/WebCore/accessibility/AccessibilityNodeObject.h:
* Source/WebCore/accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::stitchGroups const):
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::boundingBoxRect const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::isDefaultValue):
(WebCore::AXIsolatedObject::stitchGroupsView const):
(WebCore::AXIsolatedObject::stitchGroup const):
(WebCore::AXIsolatedObject::relativeFrame const):
(WebCore::AXIsolatedObject::stringValue const):
(WebCore::AXIsolatedObject::stitchState const): Deleted.
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:
* Source/WebCore/rendering/RenderBlock.h:
Canonical link: https://commits.webkit.org/303962@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications