Tables are not very navigable by AX clients in isolated tree mode. This is because our current representation of table elements doesn't perfectly follow the normal parent-child relationship of other elements, i.e. some non-row elements can return cells from children(), but the cells must regard their row as the "real" parent. When creating the isolated tree, we need to work around this. We've had to work around this in the live tree in AccessibilityObject::insertChild, too: https://github.com/WebKit/WebKit/blob/main/Source/WebCore/accessibility/AccessibilityObject.cpp#L626#L628
<rdar://problem/88506756>
Created attachment 450936 [details] Patch
Comment on attachment 450936 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=450936&action=review > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:212 > + extra newline > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:389 > + AXID computeParentForObject(AXCoreObject&, AXID assumedParentID); feel like compute might not be a necessary verb here is parentIDForObject() sufficient?
> > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.h:389 > > + AXID computeParentForObject(AXCoreObject&, AXID assumedParentID); > > feel like compute might not be a necessary verb here > > is > > parentIDForObject() > > sufficient? Yeah, that sounds good to me. Will change in the next revision of the patch.
Created attachment 450986 [details] Patch
Created attachment 450987 [details] Patch
Created attachment 451025 [details] Patch
Can we fix the table hierarchy in the live tree instead? Does this fix some of the existing table tests that are failing in ITM? Thanks.
(In reply to Andres Gonzalez from comment #8) > Can we fix the table hierarchy in the live tree instead? The problem is that AccessibilityTableColumn and AccessibilityTableHeaderContainer return children that they shouldn't (e.g table cells). The AccessibilityTableRows also (rightly) return cells as their children. Unfortunately, it seems that AppKit expects that AccessibilityTableColumn and AccessibilityTableHeaderContainer return these children, so I think this workaround is required. > Does this fix some of the existing table tests that are failing in ITM? No, seems like those tests are failing for other reasons, and we don't have a test that exercises search traversal of a table (until this patch).
Committed r289238 (246922@main): <https://commits.webkit.org/246922@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 451025 [details].