Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dcde9818cd6e96871b94e378fbaf7bd3a4308d70
https://github.com/WebKit/WebKit/commit/dcde9818cd6e96871b94e378fbaf7bd3a4308d70
Author: Tyler Wilcock <[email protected]>
Date: 2026-04-06 (Mon, 06 Apr 2026)
Changed paths:
A
LayoutTests/accessibility/text-stitching-across-inline-elements-expected.txt
A LayoutTests/accessibility/text-stitching-across-inline-elements.html
A LayoutTests/accessibility/text-stitching-after-atomic-inline-expected.txt
A LayoutTests/accessibility/text-stitching-after-atomic-inline.html
M LayoutTests/platform/glib/TestExpectations
M Source/WebCore/accessibility/AXStitchUtilities.cpp
M Source/WebCore/accessibility/AXStitchUtilities.h
M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Log Message:
-----------
AX: WebKit fails to stitch text across inline element boundaries (e.g.
abbr-element) and after atomic inlines (e.g. buttons)
https://bugs.webkit.org/show_bug.cgi?id=311581
rdar://174178906
Reviewed by Joshua Hoffman.
Previously, shouldStopStitchingAt() returned a boolean. When stitching
stopped, the current text was always skipped. This prevented stitching
text that crosses inline element boundaries (e.g. i, abbr, span elements)
after a link, because the boundary crossing was treated as a hard stop
rather than a group separator.
Replace shouldStopStitchingAt() with stitchActionFor(), which returns a
StitchAction:
- Continue: add this text to the current group
- BreakAndSkip: finalize the group and skip this text (link entry,
generated content, re-ownership)
- BreakAndAdd: finalize the group, then start a new group with this
text (semantic boundary crossing)
BreakAndAdd is the new additional behavior. It allows text after a boundary
(like
a link exit) to begin a new stitch group rather than being dropped.
Also fix atomic inline handling: buttons and other atomic inlines
previously set shouldStop=true and broke out of the entire loop that
built stitch groups, preventing any text after the first atomic inline
from being stitched. Now they finalize the current group and continue,
so text between and after multiple atomic inlines stitches correctly.
* LayoutTests/accessibility/text-stitching-across-inline-elements-expected.txt:
Added.
* LayoutTests/accessibility/text-stitching-across-inline-elements.html: Added.
* LayoutTests/accessibility/text-stitching-after-atomic-inline-expected.txt:
Added.
* LayoutTests/accessibility/text-stitching-after-atomic-inline.html: Added.
* Source/WebCore/accessibility/AXStitchUtilities.cpp:
(WebCore::hasStitchBreakingRole):
(WebCore::stitchActionFor):
(WebCore::shouldStopStitchingAt): Deleted.
* Source/WebCore/accessibility/AXStitchUtilities.h:
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::stitchGroups const):
Canonical link: https://commits.webkit.org/310683@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications