[Webkit-unassigned] [Bug 260190] AX: aria-labelledby-on-password-input fails in ITM

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 16 08:31:22 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=260190

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

--- a/Source/WebCore/accessibility/AXObjectCache.cpp
+++ b/Source/WebCore/accessibility/AXObjectCache.cpp
@@ -1282,6 +1282,11 @@ void AXObjectCache::handleChildrenChanged(AccessibilityObject& object)
             // Do not let any ancestor of an editable object update its children.
             shouldUpdateParent = false;
         }
+
+        if (auto objects = parent->labelForObjects(); objects.size()) {
+            for (const auto& axObject : objects)
+                postNotification(dynamicDowncast<AccessibilityObject>(axObject.get()), axObject->document(), AXValueChanged);
+        }

handleChildrenChanged doesn't seem the right place to add this notification. Look at

AXObjectCache::handleTextChanged
AXObjectCache::valueChanged


--- a/LayoutTests/accessibility/aria-labelledby-on-password-input.html
+++ b/LayoutTests/accessibility/aria-labelledby-on-password-input.html

-        await waitFor(() => password2.stringValue === "AXValue: \u2022\u2022\u2022\u2022\u2022");
+        await waitFor(() => {
+            return password2.stringValue === "AXValue: \u2022\u2022\u2022\u2022\u2022"
+            && button2.description === "AXDescription: Before password \u2022\u2022\u2022\u2022\u2022 After password";

Indent line starting with &&.

-- 
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/20230816/084a43e9/attachment-0001.htm>


More information about the webkit-unassigned mailing list