[Webkit-unassigned] [Bug 260278] AX: aria-selected-menu-items test is flaky in ITM mode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 21 07:45:57 PDT 2023


--- Comment #4 from Andres Gonzalez <andresg_22 at apple.com> ---
(In reply to Joshua Hoffman from comment #3)
> Created attachment 467336 [details]
> Patch

This change fixes aria-selected-menu-items in isolated tree mode by adding a traversal up for the newly selected child so that its ancestor also updates.

so that it's ancestor also updates. -> so that its ancestor also updates.

--- a/Source/WebCore/accessibility/AXObjectCache.cpp
+++ b/Source/WebCore/accessibility/AXObjectCache.cpp

+        case AXMenuListItemSelected:
+            if (RefPtr ancestor = Accessibility::findAncestor<AccessibilityObject>(*notification.first, false, [] (const auto& object) {
+                return object.canHaveSelectedChildren();
+            })) {

I think that declaring ancestor = Accessibility::findAncestor above the if statement is more legible.

--- a/LayoutTests/accessibility/aria-selected-menu-items.html
+++ b/LayoutTests/accessibility/aria-selected-menu-items.html

-        selectedChildInfo(window.accessibilityController.accessibleElementById("menu1"));
-        selectedChildInfo(window.accessibilityController.accessibleElementById("menu2"));
+        testOutput += await selectedChildInfo(window.accessibilityController.accessibleElementById("menu1"), "item2");
+        testOutput += await selectedChildInfo(window.accessibilityController.accessibleElementById("menu2"), "item5");

You can get rid of the window. in window.accessibilityController.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230821/aea78283/attachment.htm>

More information about the webkit-unassigned mailing list