Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cedc4e8d1b60f22b24d73dc6ffd752534b3f234f
https://github.com/WebKit/WebKit/commit/cedc4e8d1b60f22b24d73dc6ffd752534b3f234f
Author: Andres Gonzalez <[email protected]>
Date: 2024-04-17 (Wed, 17 Apr 2024)
Changed paths:
M
LayoutTests/accessibility/combobox/aria-combobox-control-owns-elements-expected.txt
M
LayoutTests/accessibility/combobox/aria-combobox-control-owns-elements.html
M LayoutTests/accessibility/combobox/aria-combobox-no-owns-expected.txt
M LayoutTests/accessibility/combobox/aria-combobox-no-owns.html
A
LayoutTests/accessibility/combobox/combobox-active-element-selected-children-expected.txt
A
LayoutTests/accessibility/combobox/combobox-active-element-selected-children.html
M
LayoutTests/accessibility/combobox/mac/combobox-activedescendant-notifications-expected.txt
M
LayoutTests/accessibility/combobox/mac/combobox-activedescendant-notifications.html
A
LayoutTests/accessibility/list/list-active-element-selected-children-expected.txt
A LayoutTests/accessibility/list/list-active-element-selected-children.html
A
LayoutTests/accessibility/list/listbox-active-element-selected-children-expected.txt
A
LayoutTests/accessibility/list/listbox-active-element-selected-children.html
M LayoutTests/platform/mac-wk1/TestExpectations
M LayoutTests/platform/mac/accessibility/lists-expected.txt
M LayoutTests/resources/accessibility-helper.js
M Source/WebCore/accessibility/AXCoreObject.cpp
M Source/WebCore/accessibility/AXCoreObject.h
M Source/WebCore/accessibility/AXObjectCache.cpp
M Source/WebCore/accessibility/AccessibilityObject.cpp
M Source/WebCore/accessibility/AccessibilityObject.h
M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
M Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm
M Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
M Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
M Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
M Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm
Log Message:
-----------
AX: Support AXActiveElement and AXSelectedChildren Mac APIs for comboboxes,
lists and listboxes.
https://bugs.webkit.org/show_bug.cgi?id=272565
<rdar://problem/126318573>
Reviewed by Tyler Wilcock and Dominic Mazzoni.
ARIA active descendant changes for comboboxes were exposed as
AXSelectedChildrenChanged notifications for the element controlled or owned by
the combobox, typically a list or listbox. Then a client would request the
AXSelectedChildren from that controlled element in order to know what changed
in the combobox. This assumes that the combobox's active descendant and the
list's selection are equal. This assumption is not true in many cases, most
notably in some of the examples in the ARIA Authoring Practices Guide (APG),
e.g.:
https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
The solution on this patch consists of untangling the active descendant and
selection concepts. To accomplish this, we added a separate Mac API from
AXSelectedChildren to retrieve the active descendant, namely AXActiveElement.
Note that we use active element and not active descendant as ARIA did, because
the element in question does not have to be a descendant of the combobox in the
DOM hierarchy sense. Additionally we added the AXActiveElementChanged
notification to signal clients of changes in this property.
In this patch we keep the combobox's controlled or owned element as the target
of the AXActiveElementChanged notifications. Furthermore, if the controller or
owner relationship between combobox andlist is not explicitly specified using
ARIA attributes, we establish an implicit relation with the list to which the
active descendant belongs to. Since the AXActiveDescendantChanged notification
targets the combobox's list, we also supports the scenario where the client
would query the list for the AXActiveElement, returning the combobox's one
unless it has one of its own.
*
LayoutTests/accessibility/combobox/aria-combobox-control-owns-elements-expected.txt:
* LayoutTests/accessibility/combobox/aria-combobox-control-owns-elements.html:
* LayoutTests/accessibility/combobox/aria-combobox-no-owns-expected.txt:
* LayoutTests/accessibility/combobox/aria-combobox-no-owns.html:
*
LayoutTests/accessibility/combobox/combobox-active-element-selected-children-expected.txt:
Added.
*
LayoutTests/accessibility/combobox/combobox-active-element-selected-children.html:
Added.
*
LayoutTests/accessibility/combobox/mac/combobox-activedescendant-notifications-expected.txt:
*
LayoutTests/accessibility/combobox/mac/combobox-activedescendant-notifications.html:
*
LayoutTests/accessibility/list/list-active-element-selected-children-expected.txt:
Added.
* LayoutTests/accessibility/list/list-active-element-selected-children.html:
Added.
*
LayoutTests/accessibility/list/listbox-active-element-selected-children-expected.txt:
Added.
* LayoutTests/accessibility/list/listbox-active-element-selected-children.html:
Added.
* LayoutTests/platform/mac/accessibility/lists-expected.txt:
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/resources/accessibility-helper.js:
* Source/WebCore/accessibility/AXCoreObject.cpp:
(WebCore::AXCoreObject::supportsActiveDescendant const):
(WebCore::AXCoreObject::activeDescendant const):
(WebCore::AXCoreObject::canBeControlledBy const):
* Source/WebCore/accessibility/AXCoreObject.h:
(WebCore::AXCoreObject::isGrid const):
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleActiveDescendantChange):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::ariaListboxSelectedChildren):
(WebCore::AccessibilityObject::selectedChildren):
(WebCore::AccessibilityObject::selectedListItems):
(WebCore::AccessibilityObject::selectedListItem): Deleted.
* Source/WebCore/accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::stepValueForRange const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeProperties):
* Source/WebCore/accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::postPlatformNotification):
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper _additionalAccessibilityAttributeNames:]):
(-[WebAccessibilityObjectWrapper ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::activeElement const):
(WTR::AccessibilityUIElement::selectedChildren const):
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::attributeValue):
(WTR::AccessibilityUIElement::elementForAttribute const):
(WTR::AccessibilityUIElement::activeElement const):
(WTR::AccessibilityUIElement::selectedChildren const):
Canonical link: https://commits.webkit.org/277649@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes