Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2b263331d69ae6220d230cde4aa26ab460375b6e
      
https://github.com/WebKit/WebKit/commit/2b263331d69ae6220d230cde4aa26ab460375b6e
  Author: Tyler Wilcock <[email protected]>
  Date:   2026-01-20 (Tue, 20 Jan 2026)

  Changed paths:
    A 
LayoutTests/accessibility/aria-labelledby-display-contents-shadow-root-expected.txt
    A 
LayoutTests/accessibility/aria-labelledby-display-contents-shadow-root.html
    M Source/WebCore/accessibility/AccessibilityNodeObject.cpp

  Log Message:
  -----------
  AX: Elements with display: contents and content in a shadowroot do not have 
their content read when referenced by aria-labelledby
https://bugs.webkit.org/show_bug.cgi?id=275222
rdar://129361833

Reviewed by Joshua Hoffman.

When computing accessible names for elements referenced by aria-labelledby,
textUnderElement() relies on the render tree to find children. For 
display:contents
shadow hosts, there is no renderer, so shadow root content was never included.

The fix adds special handling in accessibleNameForNode() to explicitly traverse
shadow root content for display:contents elements.

* 
LayoutTests/accessibility/aria-labelledby-display-contents-shadow-root-expected.txt:
 Added.
* LayoutTests/accessibility/aria-labelledby-display-contents-shadow-root.html: 
Added.
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::accessibleNameForNode):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to