Bug 244151 - AX: With isolated tree mode enabled, ignored objects sent along with published notifications cannot be queried by AX clients
Summary: AX: With isolated tree mode enabled, ignored objects sent along with publishe...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tyler Wilcock
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-08-19 18:52 PDT by Tyler Wilcock
Modified: 2022-08-21 11:11 PDT (History)
10 users (show)

See Also:


Attachments
Patch (16.23 KB, patch)
2022-08-19 19:00 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (16.25 KB, patch)
2022-08-19 19:36 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff
Patch (16.25 KB, patch)
2022-08-20 10:09 PDT, Tyler Wilcock
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler Wilcock 2022-08-19 18:52:17 PDT
AX: With isolated tree mode enabled, ignored objects sent along with published notifications cannot be queried by AX clients
Comment 1 Radar WebKit Bug Importer 2022-08-19 18:53:41 PDT
<rdar://problem/98908539>
Comment 2 Tyler Wilcock 2022-08-19 19:00:58 PDT
Created attachment 461747 [details]
Patch
Comment 3 chris fleizach 2022-08-19 19:19:42 PDT
Comment on attachment 461747 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=461747&action=review

> Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:288
> +    NodeChange nodeChange { isolatedObject, nullptr };

Do we have any asserts for null parents that this will hit

> Source/WebCore/accessibility/mac/AXObjectCacheMac.mm:450
> +static void createIsolatedObjectForNotificationIfNeeded(AXCoreObject& object, std::optional<PageIdentifier> pageID)

ForNorification in the name seems unnecessary

> Source/WebCore/accessibility/mac/AXObjectCacheMac.mm:466
> +        if (object.accessibilityIsIgnored())

We should check ignored status before doing the work of fetching the tree
Comment 4 Tyler Wilcock 2022-08-19 19:36:29 PDT
Created attachment 461750 [details]
Patch
Comment 5 Tyler Wilcock 2022-08-19 19:39:09 PDT
(In reply to chris fleizach from comment #3)
> Comment on attachment 461747 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=461747&action=review
> 
> > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:288
> > +    NodeChange nodeChange { isolatedObject, nullptr };
> 
> Do we have any asserts for null parents that this will hit
No, I don't think so. The unconnected isolated object that is created will consider its parent to be the nearest-in-isolated-tree object (which is guaranteed by way of using parentObjectUnignored):

https://github.com/WebKit/WebKit/blob/bb5e3d4d63fbf63b8f79347e70a5b09cdd525ca1/Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp#L48

So it will return the right parent when queried. That parent will not include this unconnected isolated object in its children, but I think that's fine and expected in this scenario.
Comment 6 Tyler Wilcock 2022-08-19 19:39:51 PDT
Fixed your other two comments.
Comment 7 Tyler Wilcock 2022-08-20 10:09:03 PDT
Created attachment 461764 [details]
Patch
Comment 8 EWS 2022-08-21 11:11:20 PDT
Committed 253629@main (16a4b06e0306): <https://commits.webkit.org/253629@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 461764 [details].