[webkit-changes] [WebKit/WebKit] bcdb26: AX: AXPropertyName::SelectedChildren for tree-role...

Tyler Wilcock noreply at github.com
Sat Oct 15 11:50:36 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bcdb262e70e8e8e33230b3939efba5bf544c299d
      https://github.com/WebKit/WebKit/commit/bcdb262e70e8e8e33230b3939efba5bf544c299d
  Author: Tyler Wilcock <tyler_w at apple.com>
  Date:   2022-10-15 (Sat, 15 Oct 2022)

  Changed paths:
    M LayoutTests/accessibility-isolated-tree/TestExpectations
    M LayoutTests/accessibility/mac/aria-multiselectable-expected.txt
    M LayoutTests/accessibility/mac/aria-multiselectable.html
    M Source/WebCore/accessibility/AXObjectCache.cpp

  Log Message:
  -----------
  AX: AXPropertyName::SelectedChildren for tree-role objects is not updated when their tree-item children become selected
https://bugs.webkit.org/show_bug.cgi?id=246534
rdar://problem/101186153

Reviewed by Chris Fleizach.

Prior to this patch, AXObjectCache::selectedChildrenChanged had multiple
problems:

  1. It was called with the Node* that became selected, not the parent
     of that object, which is confusing.

  2. It relied on the PostTarget::ObservableParent mechanism to get the AXSelectedChildrenChanged
     posted from the right object. However, this mechanism is not comprehensive enough for this
     notification, since a AccessibilityRole::Tree can never be "observable" by our current logic
     (reference AccessibilityRenderObject::renderObjectIsObservable).

This patch resolves all of these problems by:

  1. Only ever calling selectedChildrenChanged on ancestors of object's
     whose selected state changed, therefore being honest to the name of
     the function.

  2. Eschewing the PostTarget::ObservableParent mechanism in favor of simply
     finding the ancestor that AccessibilityObject::canHaveSelectedSelectedChildren.

This allows AXSelectedChildrenChanged to be posted to tree objects,
which in turn updates the isolated tree properly when tree-items changed
selected state.

* LayoutTests/accessibility-isolated-tree/TestExpectations:
Mark accessibility/mac/aria-multiselectable.html as passing.
* LayoutTests/accessibility/mac/aria-multiselectable-expected.txt:
* LayoutTests/accessibility/mac/aria-multiselectable.html:
Make test async.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::selectedChildrenChanged):
(WebCore::AXObjectCache::onSelectedChanged):

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




More information about the webkit-changes mailing list