Title: [295371] trunk
Revision
295371
Author
[email protected]
Date
2022-06-07 17:38:02 -0700 (Tue, 07 Jun 2022)

Log Message

AX: Update the isolated tree in response to dynamic aria-level and aria-setsize changes
https://bugs.webkit.org/show_bug.cgi?id=241361

Reviewed by Chris Fleizach.

New testcases added to aria-setsize-posinset.html, heading-level.html,
and mac/aria-tree.html to cover these changes.

* LayoutTests/accessibility/aria-setsize-posinset-expected.txt:
* LayoutTests/accessibility/aria-setsize-posinset.html:
Add test case that dynamically changes aria-setsize.
* LayoutTests/accessibility/heading-level-expected.txt:
* LayoutTests/accessibility/heading-level.html:
Add test case that dynamically changes aria-level on an ARIA heading.
* LayoutTests/accessibility/mac/aria-tree-expected.txt:
* LayoutTests/accessibility/mac/aria-tree.html:
Add test case that dynamically changes aria-level on a treeitem.
* LayoutTests/platform/ios/TestExpectations:
Enable heading-level.html on iOS.
* Source/WebCore/accessibility/AXLogger.cpp:
(WebCore::operator<<):
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::handleAttributeChange):
(WebCore::AXObjectCache::updateIsolatedTree):
* Source/WebCore/accessibility/AXObjectCache.h:
* Source/WebCore/accessibility/atspi/AXObjectCacheAtspi.cpp:
(WebCore::AXObjectCache::postPlatformNotification):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::updateNodeProperty):
* Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm
* Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm
Implement AccessibilityUIElement::intValue() so heading-level.html can pass.

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

Modified Paths

Diff

Modified: trunk/LayoutTests/accessibility/aria-setsize-posinset-expected.txt (295370 => 295371)


--- trunk/LayoutTests/accessibility/aria-setsize-posinset-expected.txt	2022-06-08 00:33:40 UTC (rev 295370)
+++ trunk/LayoutTests/accessibility/aria-setsize-posinset-expected.txt	2022-06-08 00:38:02 UTC (rev 295371)
@@ -16,6 +16,9 @@
 Updating aria-posinset to 4 for element #first-list-item.
 PASS: firstListItem.numberAttributeValue('AXARIAPosInSet') === 4
 
+Updating aria-setsize to 101 for element #first-list-item.
+PASS: firstListItem.numberAttributeValue('AXARIASetSize') === 101
+
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/accessibility/aria-setsize-posinset.html (295370 => 295371)


--- trunk/LayoutTests/accessibility/aria-setsize-posinset.html	2022-06-08 00:33:40 UTC (rev 295370)
+++ trunk/LayoutTests/accessibility/aria-setsize-posinset.html	2022-06-08 00:38:02 UTC (rev 295371)
@@ -38,6 +38,11 @@
             await waitFor(() => firstListItem.numberAttributeValue('AXARIAPosInSet') === 4);
             testOutput += expect("firstListItem.numberAttributeValue('AXARIAPosInSet')", "4");
 
+            testOutput += "\nUpdating aria-setsize to 101 for element #first-list-item.\n";
+            document.getElementById("first-list-item").ariaSetSize = "101";
+            await waitFor(() => firstListItem.numberAttributeValue("AXARIASetSize") === 101);
+            testOutput += expect("firstListItem.numberAttributeValue('AXARIASetSize')", "101");
+
             document.getElementById("list").style.visibility = 'hidden';
             debug(testOutput);
             finishJSTest();

Modified: trunk/LayoutTests/accessibility/heading-level-expected.txt (295370 => 295371)


--- trunk/LayoutTests/accessibility/heading-level-expected.txt	2022-06-08 00:33:40 UTC (rev 295370)
+++ trunk/LayoutTests/accessibility/heading-level-expected.txt	2022-06-08 00:38:02 UTC (rev 295371)
@@ -1,34 +1,38 @@
 This tests that headings have a level matching the implicit default value or explicitly defined aria-level value.
 
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
+PASS: axElement.intValue === parseInt(el.getAttribute('data-expected'))
 
+Verifying initial heading level of #dynamic-aria-heading.
+PASS: axElement.intValue === 1
 
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
-PASS axElement.intValue is parseInt(el.getAttribute('data-expected'))
+Updating the aria-level of #dynamic-aria-heading to 2.
+PASS: axElement.intValue === 2
+
 PASS successfullyParsed is true
 
 TEST COMPLETE
-
+X

Modified: trunk/LayoutTests/accessibility/heading-level.html (295370 => 295371)


--- trunk/LayoutTests/accessibility/heading-level.html	2022-06-08 00:33:40 UTC (rev 295370)
+++ trunk/LayoutTests/accessibility/heading-level.html	2022-06-08 00:38:02 UTC (rev 295371)
@@ -1,8 +1,8 @@
-<!DOCTYPE HTML>
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
+<script src=""
 <script src=""
-<script src=""
 </head>
 <body>
 
@@ -41,32 +41,39 @@
 <!-- implicit level for heading role -->
 <div class="ex" role="heading" data-expected="2">X</div>
 
+<div id="dynamic-aria-heading" role="heading" aria-level="1">X</div>
+
 <!-- todo: h1 elements nested in section elements should inherit nested level. -->
 
 <script>
-    description("This tests that headings have a level matching the implicit default value or explicitly defined aria-level value.")
+    var testOutput = "This tests that headings have a level matching the implicit default value or explicitly defined aria-level value.\n\n";
 
-    if (window.testRunner && window.accessibilityController) {
+    if (window.accessibilityController) {
         window.jsTestIsAsync = true;
 
+        var axElement, el;
         setTimeout(async () => {
-            var examples = document.querySelectorAll('.ex');
+            const examples = document.querySelectorAll('.ex');
             for (let i = 0; i < examples.length; ++i) {
-                window.el = examples[i];
+                el = examples[i];
                 el.id = `ex${i}`;
 
-                window.axElement = null;
-                await waitFor(() => {
-                    axElement = accessibilityController.accessibleElementById(el.id);
-                    return axElement;
-                });
+                axElement = await waitForElementById(el.id);
 
                 // Test AXLevel.
-                shouldBe("axElement.intValue", "parseInt(el.getAttribute('data-expected'))");
-
+                testOutput += expect("axElement.intValue", "parseInt(el.getAttribute('data-expected'))");
                 el.style.display = 'none'; // Hide each example after verification.
             }
 
+            testOutput += "\nVerifying initial heading level of #dynamic-aria-heading.\n";
+            axElement = await waitForElementById("dynamic-aria-heading");
+            testOutput += expect("axElement.intValue", "1");
+            testOutput += "\nUpdating the aria-level of #dynamic-aria-heading to 2.\n";
+            document.getElementById("dynamic-aria-heading").setAttribute("aria-level", "2");
+            await waitFor(() => axElement.intValue === 2);
+            testOutput += expect("axElement.intValue", "2");
+
+            debug(testOutput);
             finishJSTest();
         }, 0);
     }
@@ -73,3 +80,4 @@
 </script>
 </body>
 </html>
+

Modified: trunk/LayoutTests/accessibility/mac/aria-tree-expected.txt (295370 => 295371)


--- trunk/LayoutTests/accessibility/mac/aria-tree-expected.txt	2022-06-08 00:33:40 UTC (rev 295370)
+++ trunk/LayoutTests/accessibility/mac/aria-tree-expected.txt	2022-06-08 00:38:02 UTC (rev 295371)
@@ -1,3 +1,37 @@
+This tests that aria trees and tree items are converted into AXOutlines and AXRows, with all the right attributes.
+
+PASS: tree.role === 'AXRole: AXOutline'
+PASS: canSetRows === true
+PASS: tree.childrenCount === 8
+PASS: treeitem1.role === 'AXRole: AXRow'
+PASS: treeitem1.subrole === 'AXSubrole: AXOutlineRow'
+PASS: treeitem1.isExpanded === true
+PASS: treeitem1.hierarchicalLevel === 0
+PASS: canSetDisclosing === true
+PASS: treeitem2.role === 'AXRole: AXRow'
+PASS: treeitem2.subrole === 'AXSubrole: AXOutlineRow'
+PASS: treeitem2.isExpanded === false
+PASS: treeitem2.hierarchicalLevel === 1
+PASS: treeitem2.disclosedByRow().isEqual(treeitem1) === true
+PASS: canSetDisclosing === false
+PASS: treeitem3.stringValue === 'AXValue: Birds'
+PASS: canSetDisclosing === false
+PASS: treeitem3.role === 'AXRole: AXRow'
+PASS: treeitem3.subrole === 'AXSubrole: AXOutlineRow'
+PASS: treeitem3.isExpanded === true
+PASS: treeitem3.isSelected === false
+PASS: treeitem3.isSelected === true
+PASS: selectedRow.isEqual(treeitem3) === true
+PASS: treeitem4.hierarchicalLevel === 0
+PASS: treeitem5.hierarchicalLevel === 1
+PASS: treeitem6.hierarchicalLevel === 1
+
+Updating aria-level of #treeitem2 to 3.
+PASS: treeitem2.hierarchicalLevel === 2
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
 Animals
 Birds
 Cats
@@ -6,37 +40,3 @@
 Vegetables
 Carrots
 Broccoli
-This tests that aria trees and tree items are converted into AXOutlines and AXRows, with all the right attributes.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS tree.role is 'AXRole: AXOutline'
-PASS canSetRows is true
-PASS tree.childrenCount is 8
-PASS treeitem1.role is 'AXRole: AXRow'
-PASS treeitem1.subrole is 'AXSubrole: AXOutlineRow'
-PASS treeitem1.isExpanded is true
-PASS treeitem1.hierarchicalLevel is 0
-PASS canSetDisclosing is true
-PASS treeitem2.role is 'AXRole: AXRow'
-PASS treeitem2.subrole is 'AXSubrole: AXOutlineRow'
-PASS treeitem2.isExpanded is false
-PASS treeitem2.hierarchicalLevel is 1
-PASS treeitem2.disclosedByRow().isEqual(treeitem1) is true
-PASS canSetDisclosing is false
-PASS treeitem3.stringValue is 'AXValue: Birds'
-PASS canSetDisclosing is false
-PASS treeitem3.role is 'AXRole: AXRow'
-PASS treeitem3.subrole is 'AXSubrole: AXOutlineRow'
-PASS treeitem3.isExpanded is true
-PASS treeitem3.isSelected is false
-PASS treeitem3.isSelected is true
-PASS selectedRow.isEqual(treeitem3) is true
-PASS treeitem4.hierarchicalLevel is 0
-PASS treeitem5.hierarchicalLevel is 1
-PASS treeitem6.hierarchicalLevel is 1
-PASS successfullyParsed is true
-
-TEST COMPLETE
-

Modified: trunk/LayoutTests/accessibility/mac/aria-tree.html (295370 => 295371)


--- trunk/LayoutTests/accessibility/mac/aria-tree.html	2022-06-08 00:33:40 UTC (rev 295370)
+++ trunk/LayoutTests/accessibility/mac/aria-tree.html	2022-06-08 00:38:02 UTC (rev 295371)
@@ -1,9 +1,10 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<script src=""
+<script src=""
+<script src=""
 </head>
-<body id="body">
+<body>
 
 <ul id="tree" role="tree" aria-labelledby="treelabel" aria-activedescendant="tree0_item0_2_0_1" tabindex="0">
     <li id="treeitem1" role="treeitem" aria-level="1" aria-expanded="true">
@@ -40,78 +41,80 @@
     </li>
 </ul>
 
-<p id="description"></p>
-<div id="console"></div>
-
 <script>
+    var testOutput = "This tests that aria trees and tree items are converted into AXOutlines and AXRows, with all the right attributes.\n\n";
 
-    description("This tests that aria trees and tree items are converted into AXOutlines and AXRows, with all the right attributes.");
-
     if (window.accessibilityController) {
+        window.jsTestIsAsync = true;
 
-          var tree = document.getElementById("tree");
-          tree.focus();
+        // Test tree attributes.
+        var tree = accessibilityController.accessibleElementById("tree");
+        testOutput += expect("tree.role", "'AXRole: AXOutline'");
+        var canSetRows = tree.isAttributeSettable('AXSelectedRows');
+        testOutput += expect("canSetRows", "true");
+        testOutput += expect("tree.childrenCount", "8");
+  
+        // Test tree item attributes.
+        var treeitem1 = tree.childAtIndex(0);
+        testOutput += expect("treeitem1.role", "'AXRole: AXRow'");
+        testOutput += expect("treeitem1.subrole", "'AXSubrole: AXOutlineRow'");
+        testOutput += expect("treeitem1.isExpanded", "true");
+        testOutput += expect("treeitem1.hierarchicalLevel", "0");
+        var canSetDisclosing = treeitem1.isAttributeSettable('AXDisclosing');
+        testOutput += expect("canSetDisclosing", "true");
 
-          // Test tree attributes.
-          tree = accessibilityController.focusedElement;
-          shouldBe("tree.role", "'AXRole: AXOutline'");
-          var canSetRows = tree.isAttributeSettable('AXSelectedRows');
-          shouldBe("canSetRows", "true");
-          shouldBe("tree.childrenCount", "8");
-      
-          // Test tree item attributes.
-          var treeitem1 = tree.childAtIndex(0);
-          shouldBe("treeitem1.role", "'AXRole: AXRow'");
-          shouldBe("treeitem1.subrole", "'AXSubrole: AXOutlineRow'");
-          shouldBe("treeitem1.isExpanded", "true");
-          shouldBe("treeitem1.hierarchicalLevel", "0");
-          var canSetDisclosing = treeitem1.isAttributeSettable('AXDisclosing');
-          shouldBe("canSetDisclosing", "true");
-          
-          // Test more tree item attributes as we dive i,
-          var treeitem2 = treeitem1.disclosedRowAtIndex(0);
-          shouldBe("treeitem2.role", "'AXRole: AXRow'");
-          shouldBe("treeitem2.subrole", "'AXSubrole: AXOutlineRow'");
-          shouldBe("treeitem2.isExpanded", "false");
-          shouldBe("treeitem2.hierarchicalLevel", "1");
-          shouldBe("treeitem2.disclosedByRow().isEqual(treeitem1)", "true");
-          canSetDisclosing = treeitem2.isAttributeSettable('AXDisclosing');
-          shouldBe("canSetDisclosing", "false");
+        // Test more tree item attributes as we dive i,
+        var treeitem2 = treeitem1.disclosedRowAtIndex(0);
+        testOutput += expect("treeitem2.role", "'AXRole: AXRow'");
+        testOutput += expect("treeitem2.subrole", "'AXSubrole: AXOutlineRow'");
+        testOutput += expect("treeitem2.isExpanded", "false");
+        testOutput += expect("treeitem2.hierarchicalLevel", "1");
+        testOutput += expect("treeitem2.disclosedByRow().isEqual(treeitem1)", "true");
+        canSetDisclosing = treeitem2.isAttributeSettable('AXDisclosing');
+        testOutput += expect("canSetDisclosing", "false");
 
-          var treeitem3 = treeitem2.childAtIndex(0);
-          shouldBe("treeitem3.stringValue", "'AXValue: Birds'");
-          canSetDisclosing = treeitem3.isAttributeSettable('AXDisclosing');
-          shouldBe("canSetDisclosing", "false");
+        var treeitem3 = treeitem2.childAtIndex(0);
+        testOutput += expect("treeitem3.stringValue", "'AXValue: Birds'");
+        canSetDisclosing = treeitem3.isAttributeSettable('AXDisclosing');
+        testOutput += expect("canSetDisclosing", "false");
 
-          // Test more AXRow attributes and values as we dive further in.
-          treeitem3 = treeitem1.disclosedRowAtIndex(1);
-          shouldBe("treeitem3.role", "'AXRole: AXRow'");
-          shouldBe("treeitem3.subrole", "'AXSubrole: AXOutlineRow'");
-          shouldBe("treeitem3.isExpanded", "true");
-  
-          // test that the row can be selected correctly.
-          shouldBe("treeitem3.isSelected", "false");
-          document.getElementById("treeitem3").setAttribute("aria-selected", true);
-          shouldBe("treeitem3.isSelected", "true");
+        // Test more AXRow attributes and values as we dive further in.
+        treeitem3 = treeitem1.disclosedRowAtIndex(1);
+        testOutput += expect("treeitem3.role", "'AXRole: AXRow'");
+        testOutput += expect("treeitem3.subrole", "'AXSubrole: AXOutlineRow'");
+        testOutput += expect("treeitem3.isExpanded", "true");
 
-          // Test that the tree reports the right selected row (treeitem3)
-          var selectedRow = tree.selectedRowAtIndex(0);
-          shouldBe("selectedRow.isEqual(treeitem3)", "true");          
+        // test that the row can be selected correctly.
+        testOutput += expect("treeitem3.isSelected", "false");
+        document.getElementById("treeitem3").setAttribute("aria-selected", true);
+        testOutput += expect("treeitem3.isSelected", "true");
 
-          // Test that hierarchicalLevel can be computed automatically, also,
-          // and that it's consistent with the ARIA level.
-          var treeitem4 = accessibilityController.accessibleElementById("treeitem4");
-          shouldBe("treeitem4.hierarchicalLevel", "0");
+        // Test that the tree reports the right selected row (treeitem3)
+        var selectedRow = tree.selectedRowAtIndex(0);
+        testOutput += expect("selectedRow.isEqual(treeitem3)", "true");
 
-          var treeitem5 = accessibilityController.accessibleElementById("treeitem5");
-          shouldBe("treeitem5.hierarchicalLevel", "1");
+        // Test that hierarchicalLevel can be computed automatically, also,
+        // and that it's consistent with the ARIA level.
+        var treeitem4 = accessibilityController.accessibleElementById("treeitem4");
+        testOutput += expect("treeitem4.hierarchicalLevel", "0");
 
-          var treeitem6 = accessibilityController.accessibleElementById("treeitem6");
-          shouldBe("treeitem6.hierarchicalLevel", "1");
+        var treeitem5 = accessibilityController.accessibleElementById("treeitem5");
+        testOutput += expect("treeitem5.hierarchicalLevel", "1");
+
+        var treeitem6 = accessibilityController.accessibleElementById("treeitem6");
+        testOutput += expect("treeitem6.hierarchicalLevel", "1");
+
+        testOutput += "\nUpdating aria-level of #treeitem2 to 3.\n";
+        document.getElementById("treeitem2").setAttribute("aria-level", "3");
+        setTimeout(async function() {
+            await waitFor(() => treeitem2.hierarchicalLevel === 2);
+            testOutput += expect("treeitem2.hierarchicalLevel", "2");
+
+            debug(testOutput);
+            finishJSTest();
+        }, 0);
     }
-
 </script>
-
-<script src=""
 </body>
 </html>
+

Modified: trunk/LayoutTests/platform/ios/TestExpectations (295370 => 295371)


--- trunk/LayoutTests/platform/ios/TestExpectations	2022-06-08 00:33:40 UTC (rev 295370)
+++ trunk/LayoutTests/platform/ios/TestExpectations	2022-06-08 00:38:02 UTC (rev 295371)
@@ -2122,6 +2122,7 @@
 accessibility/aria-required-updates-after-dynamic-change.html [ Pass ]
 accessibility/display-contents-element-roles.html [ Pass ]
 accessibility/element-haspopup.html [ Pass ]
+accessibility/heading-level.html [ Pass ]
 accessibility/list-with-dynamically-changing-content.html [ Pass ]
 accessibility/node-only-inert-object.html [ Pass ]
 accessibility/node-only-object-element-rect.html [ Pass ]

Modified: trunk/Source/WebCore/accessibility/AXLogger.cpp (295370 => 295371)


--- trunk/Source/WebCore/accessibility/AXLogger.cpp	2022-06-08 00:33:40 UTC (rev 295370)
+++ trunk/Source/WebCore/accessibility/AXLogger.cpp	2022-06-08 00:38:02 UTC (rev 295371)
@@ -412,6 +412,9 @@
     case AXObjectCache::AXNotification::AXLayoutComplete:
         stream << "AXLayoutComplete";
         break;
+    case AXObjectCache::AXNotification::AXLevelChanged:
+        stream << "AXLevelChanged";
+        break;
     case AXObjectCache::AXNotification::AXLoadComplete:
         stream << "AXLoadComplete";
         break;
@@ -433,6 +436,9 @@
     case AXObjectCache::AXNotification::AXSelectedTextChanged:
         stream << "AXSelectedTextChanged";
         break;
+    case AXObjectCache::AXNotification::AXSetSizeChanged:
+        stream << "AXSetSizeChanged";
+        break;
     case AXObjectCache::AXNotification::AXValueChanged:
         stream << "AXValueChanged";
         break;

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (295370 => 295371)


--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2022-06-08 00:33:40 UTC (rev 295370)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2022-06-08 00:38:02 UTC (rev 295371)
@@ -1952,10 +1952,14 @@
         postNotification(element, AXDescribedByChanged);
     else if (attrName == aria_grabbedAttr)
         postNotification(element, AXGrabbedStateChanged);
+    else if (attrName == aria_levelAttr)
+        postNotification(element, AXLevelChanged);
     else if (attrName == aria_posinsetAttr)
         postNotification(element, AXPositionInSetChanged);
     else if (attrName == aria_selectedAttr)
         selectedStateChanged(element);
+    else if (attrName == aria_setsizeAttr)
+        postNotification(element, AXSetSizeChanged);
     else if (attrName == aria_expandedAttr)
         handleAriaExpandedChange(element);
     else if (attrName == aria_haspopupAttr)
@@ -3524,6 +3528,10 @@
         case AXSelectedStateChanged:
             tree->updateNodeProperty(*notification.first, AXPropertyName::IsSelected);
             break;
+        case AXSetSizeChanged:
+            tree->updateNodeProperty(*notification.first, AXPropertyName::SetSize);
+            tree->updateNodeProperty(*notification.first, AXPropertyName::SupportsSetSize);
+            break;
         case AXActiveDescendantChanged:
         case AXAriaRoleChanged:
         case AXDescribedByChanged:
@@ -3531,6 +3539,7 @@
         case AXGrabbedStateChanged:
         case AXHasPopupChanged:
         case AXInvalidStatusChanged:
+        case AXLevelChanged:
         case AXMenuListValueChanged:
         case AXPressedStateChanged:
         case AXSelectedChildrenChanged:

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.h (295370 => 295371)


--- trunk/Source/WebCore/accessibility/AXObjectCache.h	2022-06-08 00:33:40 UTC (rev 295370)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.h	2022-06-08 00:38:02 UTC (rev 295371)
@@ -290,6 +290,7 @@
         AXImageOverlayChanged,
         AXLanguageChanged,
         AXLayoutComplete,
+        AXLevelChanged,
         AXLoadComplete,
         AXNewDocumentLoadComplete,
         AXPageScrolled,
@@ -297,6 +298,7 @@
         AXSelectedChildrenChanged,
         AXSelectedStateChanged,
         AXSelectedTextChanged,
+        AXSetSizeChanged,
         AXValueChanged,
         AXScrolledToAnchor,
         AXLiveRegionCreated,

Modified: trunk/Source/WebCore/accessibility/atspi/AXObjectCacheAtspi.cpp (295370 => 295371)


--- trunk/Source/WebCore/accessibility/atspi/AXObjectCacheAtspi.cpp	2022-06-08 00:33:40 UTC (rev 295370)
+++ trunk/Source/WebCore/accessibility/atspi/AXObjectCacheAtspi.cpp	2022-06-08 00:38:02 UTC (rev 295371)
@@ -203,6 +203,10 @@
         break;
     case AXHasPopupChanged:
         break;
+    case AXSetSizeChanged:
+        break;
+    case AXLevelChanged:
+        break;
     }
 }
 

Modified: trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp (295370 => 295371)


--- trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp	2022-06-08 00:33:40 UTC (rev 295370)
+++ trunk/Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp	2022-06-08 00:38:02 UTC (rev 295371)
@@ -371,6 +371,9 @@
     case AXPropertyName::ReadOnlyValue:
         propertyMap.set(AXPropertyName::ReadOnlyValue, axObject.readOnlyValue().isolatedCopy());
         break;
+    case AXPropertyName::SetSize:
+        propertyMap.set(AXPropertyName::SetSize, axObject.setSize());
+        break;
     case AXPropertyName::SortDirection:
         propertyMap.set(AXPropertyName::SortDirection, static_cast<int>(axObject.sortDirection()));
         break;
@@ -377,6 +380,9 @@
     case AXPropertyName::SupportsPosInSet:
         propertyMap.set(AXPropertyName::SupportsPosInSet, axObject.supportsPosInSet());
         break;
+    case AXPropertyName::SupportsSetSize:
+        propertyMap.set(AXPropertyName::SupportsSetSize, axObject.supportsSetSize());
+        break;
     default:
         return;
     }

Modified: trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm (295370 => 295371)


--- trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm	2022-06-08 00:33:40 UTC (rev 295370)
+++ trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm	2022-06-08 00:38:02 UTC (rev 295371)
@@ -834,7 +834,7 @@
 
 double AccessibilityUIElement::intValue() const
 {
-    return 0.0f;
+    return [[m_element accessibilityValue] integerValue];
 }
 
 double AccessibilityUIElement::minValue()

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (295370 => 295371)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm	2022-06-08 00:33:40 UTC (rev 295370)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm	2022-06-08 00:38:02 UTC (rev 295371)
@@ -593,7 +593,7 @@
 
 double AccessibilityUIElement::intValue() const
 {
-    return 0;
+    return [[m_element accessibilityValue] integerValue];
 }
 
 double AccessibilityUIElement::minValue()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to