[Webkit-unassigned] [Bug 242401] AX: Expose suggestion, insertion, deletion roles and attributes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 13 12:08:19 PDT 2022


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

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

--- a/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm
+++ a/Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm

+- (BOOL)accessibilityIsFirstItemInSuggestion
+{
...
+    auto children = suggestion->children();
+    auto parent = self.axBackingObject->parentObject();
+    BOOL isFirstChildOfParent = parent && parent->children().size() && parent->children()[0] == self.axBackingObject;
+    return children.size() && (children[0] == self.axBackingObject || (isFirstChildOfParent && children[0]->isAncestorOfObject(self.axBackingObject)));

I think this logic fails in the following case:

<suggestion>
    <grandparent>
        <uncle>
            <child1>
        <parent>
            <child2>

it will return true for child2.

-- 
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/20220713/9c32f019/attachment.htm>


More information about the webkit-unassigned mailing list