Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 24ef9396933d6067dbf9bb6f9f4744b42d699757
      
https://github.com/WebKit/WebKit/commit/24ef9396933d6067dbf9bb6f9f4744b42d699757
  Author: Tyler Wilcock <[email protected]>
  Date:   2026-02-17 (Tue, 17 Feb 2026)

  Changed paths:
    A 
LayoutTests/accessibility/native-label-geometry-with-aria-labelledby-expected.txt
    A LayoutTests/accessibility/native-label-geometry-with-aria-labelledby.html
    M LayoutTests/platform/glib/TestExpectations
    M Source/WebCore/accessibility/AXCoreObject.h
    M Source/WebCore/accessibility/AXLogger.cpp
    M Source/WebCore/accessibility/AXObjectCache.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp

  Log Message:
  -----------
  AX: Controls with aria-labelledby should use native label geometry when both 
they and their ARIA label has no visible bounding box
https://bugs.webkit.org/show_bug.cgi?id=308022
rdar://problem/170518900

Reviewed by Joshua Hoffman.

When a visually-hidden control has both aria-labelledby pointing to a 
visually-hidden element and a
native <label for> element with visible geometry, we were unable to compute a 
bounding box
for the control because we rejected the native label relationship entirely when 
ARIA
labelling existed. This was done because ARIA labels beat out native labels in 
the accname
calculation.

This patch introduces NativeLabelFor/NativeLabeledBy relations that are always 
created
for label-for="id" associations, independent of the presence of ARIA labelling. 
The existing
LabelFor/LabeledBy relations continue to respect ARIA precedence for accessible 
name calculation.
In relativeFrame(), we now fall back to native label geometry when ARIA labels 
don't
provide a usable frame.

* 
LayoutTests/accessibility/native-label-geometry-with-aria-labelledby-expected.txt:
 Added.
* LayoutTests/accessibility/native-label-geometry-with-aria-labelledby.html: 
Added.
* Source/WebCore/accessibility/AXCoreObject.h:
(WebCore::AXCoreObject::nativeLabeledByObjects const):
* Source/WebCore/accessibility/AXLogger.cpp:
(WebCore::operator<<):
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::symmetricRelation):
(WebCore::AXObjectCache::addLabelForRelation):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::relativeFrame const):

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



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

Reply via email to