Skip to content
Permalink
Browse files
AX: Update the isolated tree when aria-selected changes
https://bugs.webkit.org/show_bug.cgi?id=240703

Reviewed by Chris Fleizach.

Fixes accessibility/selected-state-changed-notifications.html in
isolated tree mode.

* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::updateIsolatedTree):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateNodeProperty):
* LayoutTests/accessibility/selected-state-changed-notifications.html:

Canonical link: https://commits.webkit.org/250810@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
twilco committed May 20, 2022
1 parent 3efeb8e commit 94ad0c1582cccee20cf6f20b3af556c776e8c137
Showing 3 changed files with 7 additions and 1 deletion.
@@ -51,7 +51,7 @@
axSelectable.press();
setTimeout(async () => {
await waitFor(() => {
return notificationCount == 1;
return notificationCount == 1 && axSelectable.isSelected;
});
shouldBeTrue("axSelectable.isSelected");
if (platform == "ios")
@@ -3446,6 +3446,9 @@ void AXObjectCache::updateIsolatedTree(const Vector<std::pair<RefPtr<AXCoreObjec
case AXRequiredStatusChanged:
tree->updateNodeProperty(*notification.first, AXPropertyName::IsRequired);
break;
case AXSelectedStateChanged:
tree->updateNodeProperty(*notification.first, AXPropertyName::IsSelected);
break;
case AXActiveDescendantChanged:
case AXAriaRoleChanged:
case AXElementBusyChanged:
@@ -356,6 +356,9 @@ void AXIsolatedTree::updateNodeProperty(AXCoreObject& axObject, AXPropertyName p
case AXPropertyName::IsRequired:
propertyMap.set(AXPropertyName::IsRequired, axObject.isRequired());
break;
case AXPropertyName::IsSelected:
propertyMap.set(AXPropertyName::IsSelected, axObject.isSelected());
break;
case AXPropertyName::ReadOnlyValue:
propertyMap.set(AXPropertyName::ReadOnlyValue, axObject.readOnlyValue().isolatedCopy());
break;

0 comments on commit 94ad0c1

Please sign in to comment.