Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5d93330177973782771b8f4e44c1503ce464773c
https://github.com/WebKit/WebKit/commit/5d93330177973782771b8f4e44c1503ce464773c
Author: Tyler Wilcock <[email protected]>
Date: 2026-01-20 (Tue, 20 Jan 2026)
Changed paths:
A LayoutTests/accessibility/first-letter-single-character-expected.txt
A LayoutTests/accessibility/first-letter-single-character.html
M LayoutTests/platform/glib/TestExpectations
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Log Message:
-----------
AX: ::first-letter text not exposed in the accessibility tree if no other
text accompanies it
https://bugs.webkit.org/show_bug.cgi?id=305787
rdar://168458291
Reviewed by Joshua Hoffman.
When a ::first-letter pseudo-element consumes all text in an element
(e.g., <div>h</div> with div::first-letter styling), the text node's
renderer becomes an empty RenderTextFragment. The hasRenderedText()
check in computeIsIgnored() returns false for this empty fragment,
causing the text to be incorrectly ignored in the accessibility tree.
Fix this by checking if an empty RenderTextFragment has an associated
first-letter container. If so, don't ignore it because its text content
can still be retrieved from the associated DOM Text node.
* LayoutTests/accessibility/first-letter-single-character-expected.txt: Added.
* LayoutTests/accessibility/first-letter-single-character.html: Added.
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::computeIsIgnored const):
Canonical link: https://commits.webkit.org/305884@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications