Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b0b7fd4bdd3a70858657ed0441c3dc8b598c3660
https://github.com/WebKit/WebKit/commit/b0b7fd4bdd3a70858657ed0441c3dc8b598c3660
Author: Tyler Wilcock <[email protected]>
Date: 2026-02-24 (Tue, 24 Feb 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/html-aam/roles-contextual-expected.txt
M Source/WebCore/accessibility/AXUtilities.cpp
M Source/WebCore/accessibility/AXUtilities.h
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Log Message:
-----------
AX: hasAccNameAttribute doesn't validate aria-labelledby ID references,
causing incorrect role computation
https://bugs.webkit.org/show_bug.cgi?id=307306
rdar://169935334
Reviewed by Joshua Hoffman.
This commit updates hasAccNameAttribute() to validate that aria-labelledby and
aria-describedby actually reference existing elements with non-empty
text content. Previously, the function would return true for any
non-empty aria-labelledby value, even if it referenced non-existing
IDs, empty elements, or elements with only whitespace.
This ensures that elements like <section> and <aside> (which require
an accessible name to be exposed as landmarks) don't incorrectly get
landmark roles when aria-labelledby references invalid or empty
content. Also validates that title attributes with only whitespace
are not considered valid accessible names.
*
LayoutTests/imported/w3c/web-platform-tests/html-aam/roles-contextual-expected.txt:
* Source/WebCore/accessibility/AXUtilities.cpp:
(WebCore::hasAccNameAttribute):
Canonical link: https://commits.webkit.org/308183@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications