Expose ARIA trees as tables for macOS accessibility
ARIA trees were previously un-navigable with VoiceOver on macOS. This was because it didn't properly fulfill the NSAccessibilityRowsAttribute attribute. In webkit, this attribute is fulfilled by diving on the row's children and surfacing any TreeItem elements. This CL represents a port of their implementation. Additionally, I noticed a confusing spot where the subrole is being compared in a long line of role comparisons. I moved this around to be less foot-gunny/confusing and added more attributes for the OutlineRow subrole that macOS accessibility suggests are necessary (and exist in the webkit implementation). Link to webkit impl: https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm#L2836 https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/accessibility/AccessibilityObject.cpp#L1804 Bug: 868480 Test: Use VoiceOver to navigate the table at https://cookiecrook.com/test/aria/tree/ariatree2.html. Note that the table is no longer announced as empty. Change-Id: Ibb86049efa23e12875aa9aeda541e0145242e3b5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2062913Reviewed-by:Dominic Mazzoni <dmazzoni@chromium.org> Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org> Auto-Submit: Andy Locascio <andy@slack-corp.com> Cr-Commit-Position: refs/heads/master@{#744740}
Showing
Please register or sign in to comment