aom icon indicating copy to clipboard operation
aom copied to clipboard

Accessibility Tree Traversal

Open davidturissini opened this issue 7 years ago • 1 comments

Stage 4 of the proposal will allow for the "ability to walk the computed tree structure including virtual nodes" but has very little to say about how accessibility nodes can be identified during traversal when the associated element is not available to the consumer, as in the case of closed shadow roots.

For instance, the example at https://github.com/WICG/aom/blob/gh-pages/explainer.md#use-cases-for-accessible-properties details a case where a consumer can get an element's accessibilityNode because the shadow root is open, and the consumer can use querySelector. This approach is not possible in closed shadow roots because the shadow root is not accessible by the consumer. How would a consumer traverse accessibility node's in a closed shadow dom and find the same node associated with 'custom-optionlist'?

davidturissini avatar Dec 20 '17 20:12 davidturissini

The design for phase 4 is still very much under debate, but #86 tracks some early thoughts - in particular, the idea that the computed node will be an entirely separate object from element.accessibleNode. But you should be able to walk between computed accessible nodes via parent/child/sibling relationships, including computed accessible nodes which potentially don't have an equivalent DOM node, such as pseudo-elements.

It may or may not be possible to walk into closed Shadow DOM, regardless - that's something we need to figure out.

alice avatar Dec 20 '17 21:12 alice