[webkit-changes] [WebKit/WebKit] b4c7de: AX: textUnderElement for hidden elements targeted ...
Tyler Wilcock
noreply at github.com
Sun Mar 31 09:18:28 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b4c7de1fa6230e63a919190ed2639266c350757e
https://github.com/WebKit/WebKit/commit/b4c7de1fa6230e63a919190ed2639266c350757e
Author: Tyler Wilcock <tyler_w at apple.com>
Date: 2024-03-31 (Sun, 31 Mar 2024)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/accname/name/comp_label-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/accname/name/comp_labelledby_hidden_nodes-expected.txt
M LayoutTests/platform/gtk/imported/w3c/web-platform-tests/accname/name/comp_label-expected.txt
M Source/WebCore/accessibility/AXCoreObject.h
M Source/WebCore/accessibility/AXLogger.cpp
M Source/WebCore/accessibility/AccessibilityMathMLElement.cpp
M Source/WebCore/accessibility/AccessibilityMathMLElement.h
M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
M Source/WebCore/accessibility/AccessibilityNodeObject.h
M Source/WebCore/accessibility/AccessibilityObject.h
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
M Source/WebCore/accessibility/AccessibilityRenderObject.h
M Source/WebCore/accessibility/atspi/AccessibilityObjectTextAtspi.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
Log Message:
-----------
AX: textUnderElement for hidden elements targeted by aria-labelledby should expose all subtree text, not just the direct target of aria-labelledby
https://bugs.webkit.org/show_bug.cgi?id=271918
rdar://problem/125634439
Reviewed by Chris Fleizach.
https://w3c.github.io/accname/#comp_labelledby
> The result of LabelledBy Recursion in combination with Hidden Not Referenced means that user agents MUST include all
> nodes in the subtree as part of the accessible name or accessible description, when the node referenced by aria-labelledby
> or aria-describedby is hidden.
Prior to this patch, we correctly exposed the text of the children directly underneath DOM hidden nodes targeted by
aria-labelledby, but not grandchildren or deeper, which is what the spec requires.
This allows us to pass 7 more WPT subtests.
This patch also renames AccessibilityTextUnderElementMode to TextUnderElementMode, as the former is very long and implicit
considering the type is defined in the Accessibility namespace.
* LayoutTests/imported/w3c/web-platform-tests/accname/name/comp_label-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/accname/name/comp_labelledby_hidden_nodes-expected.txt:
* LayoutTests/platform/gtk/imported/w3c/web-platform-tests/accname/name/comp_label-expected.txt:
* Source/WebCore/accessibility/AXCoreObject.h:
(WebCore::TextUnderElementMode::TextUnderElementMode):
(WebCore::AccessibilityTextUnderElementMode::AccessibilityTextUnderElementMode): Deleted.
* Source/WebCore/accessibility/AXLogger.cpp:
(WebCore::operator<<):
* Source/WebCore/accessibility/AccessibilityMathMLElement.cpp:
(WebCore::AccessibilityMathMLElement::textUnderElement const):
* Source/WebCore/accessibility/AccessibilityMathMLElement.h:
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::visibleText const):
(WebCore::shouldUseAccessibilityObjectInnerText):
(WebCore::AccessibilityNodeObject::textUnderElement const):
(WebCore::AccessibilityNodeObject::title const):
(WebCore::accessibleNameForNode):
* Source/WebCore/accessibility/AccessibilityNodeObject.h:
* Source/WebCore/accessibility/AccessibilityObject.h:
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement const):
(WebCore::AccessibilityRenderObject::shouldGetTextFromNode const):
* Source/WebCore/accessibility/AccessibilityRenderObject.h:
* Source/WebCore/accessibility/atspi/AccessibilityObjectTextAtspi.cpp:
(WebCore::AccessibilityObjectAtspi::text const):
(WebCore::AccessibilityObject::getLengthForTextRange const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::textUnderElement const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
Canonical link: https://commits.webkit.org/276864@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list