Vixen
dd8b0a81
csharp
public sealed class AccessibilityTree

The accessibility tree of a document at one moment, as data a bridge can answer from.

Read the guide page for this →

Remarks

This is the traversal, and it is the only one. Two rules decide what the accessibility tree is, and they used to live in a test-support assembly:

⚠ An element that is not a node is walked through rather than skipped. Its children rise to its parent's depth, which is what ARIA's none means and is the difference between a tree a screen reader can read and thirty nested groups.

⚠ An element reached by Owns is emitted under its owner and not where the element tree has it. A Select's list is a child of the document root — an overlay inside the field that opens it would be clipped — and the relation is how the control says so. Reproducing that wrongly gives a screen reader a combo box with nothing in it and a pile of loose lists at the end.

AccessibilitySnapshot.Render is a renderer over this and no longer a second walk, which is what makes this repository's accessibility test discipline a bridge's evidence rather than a parallel universe: the string a control's snapshot test asserts on is rendered from the same nodes a screen reader would be handed.

Fields and properties (3)

  • public IReadOnlyList<AccessibilityNode> Roots

    The tops of the tree.

  • public int Count

    How many nodes there are, at every depth.

  • public IReadOnlyList<AccessibilityNode> Nodes

    Every node, in the order the walk reached them, which is document order.

Methods (3)

Used by (3)

  • AccessibilitySnapshotVixen.Ui.Testing
  • AccessibilityTreeSourceVixen.Ui
  • AccessibilityTreeTestsVixen.Ui.Tests