Skip to content

refactor(a11y): centralize tree queries - #527

Merged
xxx merged 2 commits into
masterfrom
mpd/centralize-axtree-queries
Aug 25, 2026
Merged

refactor(a11y): centralize tree queries#527
xxx merged 2 commits into
masterfrom
mpd/centralize-axtree-queries

Conversation

@xxx

@xxx xxx commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Description

What

  • add reusable pre-order and ancestor-path queries to AxTree
  • make precise element matching an AxTree operation while retaining the free-function API
  • migrate wait and popover session logic to the centralized tree queries

Why

Tree traversal was split between the accessibility model and session-specific recursive helpers. Keeping traversal mechanics on AxTree gives callers one query boundary while leaving wait, click, and popover policy in the session layer.

How

AxTree::find_first owns pre-order predicate traversal, AxTree::path_to owns root-to-target traversal, and AxTree::element_match composes selector and condition semantics from those primitives. Existing diagnostics and behavior are unchanged.

Testing

  • cargo fmt --all -- --check
  • cargo test --workspace
  • cargo clippy --workspace --all-targets -- -D warnings

@xxx
xxx marked this pull request as ready for review August 25, 2026 19:56
@xxx
xxx merged commit 3241ae1 into master Aug 25, 2026
17 checks passed
@xxx
xxx deleted the mpd/centralize-axtree-queries branch August 25, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant