AX Isolated Tree: Document links should be stored in web areas, not the root
commitbc3c63eb483b154495199fbcb6e69f2049581024
authortyler_w@apple.com <tyler_w@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Dec 2021 15:25:52 +0000 (2 15:25 +0000)
committertyler_w@apple.com <tyler_w@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Dec 2021 15:25:52 +0000 (2 15:25 +0000)
tree92278e931460f4886a475078b53a50ee3091cd2d
parenta556db07415e987d7d95cf50d1633626a80cb4e6
AX Isolated Tree: Document links should be stored in web areas, not the root
https://bugs.webkit.org/show_bug.cgi?id=233728

Reviewed by Chris Fleizach.

Source/WebCore:

In WebAccessibilityObjectWrapperMac.mm, we expose the document links attribute (AXLinkUIElements)
on web areas. However, in AXIsolatedObject::initializeAttributeData we currently only store
AXPropertyName::DocumentLinks for the root element, which is not a web area.

In this patch, we store document links for web area elements instead
of the root element.

This patch fixes accessibility/visible-elements.html, which tests document links.

https://github.com/WebKit/WebKit/blob/109c8234854a0fa28955d81994bb98daa1fa14fe/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm#L2235#L2237

* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::initializeAttributeData):

LayoutTests:

* accessibility/visible-elements.html:
* accessibility/visible-elements-expected.txt:
Make this test async so it passes in isolated tree mode.
This test must be async because it includes JS that dynamically
changes page content.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@286426 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/accessibility/visible-elements-expected.txt
LayoutTests/accessibility/visible-elements.html
Source/WebCore/ChangeLog
Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp