Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d6d2686c24a7aaedebadd9eba30cfb0b408b7639
https://github.com/WebKit/WebKit/commit/d6d2686c24a7aaedebadd9eba30cfb0b408b7639
Author: Tyler Wilcock <[email protected]>
Date: 2026-02-05 (Thu, 05 Feb 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/accname/name/comp_name_from_content-expected.txt
M Source/WebCore/accessibility/AXCoreObject.h
M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Log Message:
-----------
AX: WebKit's accname computation can double-include text from a node pointed
to by aria-labelledby
https://bugs.webkit.org/show_bug.cgi?id=306927
rdar://169593121
Reviewed by Joshua Hoffman.
When computing the accessible name for an element, if a child references another
element via aria-labelledby, that referenced element was being counted twice:
once when processing the aria-labelledby reference, and again when traversing
the DOM tree and encountering the element directly.
Fix this by tracking nodes that have been processed via aria-labelledby during
name computation, and skipping them when encountered again in the tree
traversal.
*
LayoutTests/imported/w3c/web-platform-tests/accname/name/comp_name_from_content-expected.txt:
Mark testcase as fixed.
* Source/WebCore/accessibility/AXCoreObject.h:
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::visibleText const):
(WebCore::AccessibilityNodeObject::textUnderElement const):
Canonical link: https://commits.webkit.org/306873@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications