Title: [294565] trunk
Revision
294565
Author
tyle...@apple.com
Date
2022-05-20 12:34:21 -0700 (Fri, 20 May 2022)

Log Message

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

Modified Paths

Diff

Modified: trunk/LayoutTests/accessibility/selected-state-changed-notifications.html (294564 => 294565)


--- trunk/LayoutTests/accessibility/selected-state-changed-notifications.html	2022-05-20 19:01:16 UTC (rev 294564)
+++ trunk/LayoutTests/accessibility/selected-state-changed-notifications.html	2022-05-20 19:34:21 UTC (rev 294565)
@@ -51,7 +51,7 @@
         axSelectable.press();
         setTimeout(async () => {
             await waitFor(() => {
-                return notificationCount == 1;
+                return notificationCount == 1 && axSelectable.isSelected;
             });
             shouldBeTrue("axSelectable.isSelected");
             if (platform == "ios")

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (294564 => 294565)


--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2022-05-20 19:01:16 UTC (rev 294564)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2022-05-20 19:34:21 UTC (rev 294565)
@@ -3446,6 +3446,9 @@
         case AXRequiredStatusChanged:
             tree->updateNodeProperty(*notification.first, AXPropertyName::IsRequired);
             break;
+        case AXSelectedStateChanged:
+            tree->updateNodeProperty(*notification.first, AXPropertyName::IsSelected);
+            break;
         case AXActiveDescendantChanged:
         case AXAriaRoleChanged:
         case AXElementBusyChanged:

Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp (294564 => 294565)


--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp	2022-05-20 19:01:16 UTC (rev 294564)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp	2022-05-20 19:34:21 UTC (rev 294565)
@@ -356,6 +356,9 @@
     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;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to