Skip to content

v0.3.1 — positional specificity, region annotations, hardened hit-testing

Choose a tag to compare

@angusbezzina angusbezzina released this 07 Jul 19:25
· 69 commits to main since this release

Selection: pure positional specificity

The smallest/deepest meaningful element under the cursor wins — a button on a card at the button, the card's surface at the card padding, the section at the section padding. Cursor position is the level selector; there is no depth-walking UI. Plain SwiftUI Text now counts as meaningful via its AXValue (previously text leaves were skipped and hovers escalated to the page container).

Region annotations

Clicks where no accessibility node exists (decoration, dividers, gaps) are no longer dropped: the session captures a region note anchored to the nearest meaningful element with an offset from its top-left, persisted as an optional regionOffset (old note files decode unchanged). Markdown and JSON exports render the locator.

Hit-testing hardening (since 0.2.x)

  • Window chrome (traffic lights, including their inner glyph groups) is never an annotation target.
  • Whole-window unidentified hosting groups can't swallow background clicks.
  • Descent prefers the most specific containing child; equal-area ties resolve to content over seeded surfaces.
  • Host-window APIs: install(on:)/mount(on:) for explicit window targeting; overlay geometry settles after content-driven host resizes.
  • Fixed: a region-then-element re-selection no longer leaks the region offset onto the element note.

52 tests + two headless probe harnesses (AnnotKitProbe, AnnotKitOverlayProbe with 7 phase groups) all green.