The framework-neutral accessible tree of a document session: a document node whose children are page nodes, each page's content nodes built on demand from its layout tree, reading-order navigation (next and previous element, heading, landmark, table, list, figure, link, control, page), an accessible focus that follows the viewer's page and moves the viewer to what it focuses, and change notifications a shell maps onto ARIA/DOM, UI Automation or NSAccessibility.
public sealed class AccessibilityBridge
ISO 32000-2 §14.8 (tagged PDF), §14.8.2.5 (reading order), §14.9.3 (alternate descriptions), Spec #33 viewer capability 8. The tree is virtualised by page: a page's children exist once it is loaded (LoadPage(Int32), LoadPageAsync(Int32, CancellationToken)), and navigation loads the pages it walks through. Each load raises ChildrenChanged.
The viewer drives the bridge with Update() (or Update(PageLayout, in Viewport)) once per frame: a change of the viewer's current page moves the focus to the first node of the new page. With a Viewer, moving the focus scrolls it so the focused node is in view. Navigation, focus, state and bounds queries over loaded pages allocate nothing. Not thread-safe: drive it from the UI thread.
kind:method, kind:property, kind:ctor. Press Esc to clear.AccessibilityBridge(DocumentSession, IAccessibleElementProvider?)Initializes a bridge over a session's document with the elements of the viewer's annotation, link and form layers.AccessibilityBridge(DocumentSession)Initializes a bridge over a session's document.ElementsGets the provider of non-content elements, or null.FocusGets the node with the accessible focus, or null.ObserverGets or sets the callback told when the focus moves, a page's children are built, or the viewport changes; the shell raises the matching automation events from it.RootGets the document node, whose children are the page nodes.SessionGets the document session.FindNext(AccessibleNode?, AccessibleNavigation, Boolean, Int32)Finds the next node in reading order matching a target, loading pages as it walks.FindNode(Int32, Object)Finds a loaded page's node for an element source (or the layout node a content node was built from).GetNodeAt(in PagePoint)Returns the deepest node whose page bounds contain a point (explore by touch), loading the page if needed.GetPage(Int32)Gets a page's node; its children are empty until the page is loaded.GetStates(AccessibleNode)Returns a node's states: its own (focusable, element states) plus focused and offscreen.InvalidatePage(Int32)Rebuilds a loaded page's children, for when its elements' values or states changed; the focus moves to the rebuilt node with the same source or position.IsPageLoaded(Int32)Returns whether a page's children are built.LoadPage(Int32)Builds a page's children from its layout tree, on the calling thread, if they are not built yet.LoadPageAsync(Int32, CancellationToken)Fetches a page (remote documents) through the session, then builds its children.MoveFocus(AccessibleNavigation, Boolean, Int32)Moves the focus to the next node matching a target (FindNext(AccessibleNode?, AccessibleNavigation, Boolean, Int32) from Focus).SetFocus(AccessibleNode?)Moves the focus to a node (or clears it), scrolling the Viewer to it.TryGetBounds(AccessibleNode, out LayoutRectangle)Returns a node's bounds in viewport pixels for the last Update(PageLayout, in Viewport).TryGetViewportShowing(AccessibleNode, out Viewport)Returns the viewport that brings a node into view with the least scrolling from the last viewport.Update()Follows the Viewer: Update(PageLayout, in Viewport) with its layout and viewport.Update(PageLayout, in Viewport)Tells the bridge the viewer's layout and viewport, once per frame: a change raises BoundsChanged, and a change of the current page moves the focus to the first node of the new page unless the focus is already there.