pub struct Modifiers {
pub near: Option<Box<Selector>>,
pub below: Option<Box<Selector>>,
pub above: Option<Box<Selector>>,
pub left_of: Option<Box<Selector>>,
pub right_of: Option<Box<Selector>>,
pub inside: Option<Box<Selector>>,
pub ancestor: Option<Box<Selector>>,
pub nth: Option<usize>,
pub first: Option<bool>,
pub last: Option<bool>,
}Expand description
Modifier set stackable on Text / Id / Label / Role base forms. Spatial keys (near/below/above/leftOf/rightOf/inside) carry recursive selectors that resolve to an anchor node; index keys (nth/first/last) pick from the surviving candidate list.
Fields§
§near: Option<Box<Selector>>Anchor sub-selector — candidate must be geometrically near it.
below: Option<Box<Selector>>Anchor sub-selector — candidate must be below it (larger y center).
above: Option<Box<Selector>>Anchor sub-selector — candidate must be above it (smaller y center).
left_of: Option<Box<Selector>>Anchor sub-selector — candidate must be to its left.
right_of: Option<Box<Selector>>Anchor sub-selector — candidate must be to its right.
inside: Option<Box<Selector>>Anchor sub-selector — candidate must be geometrically inside it.
ancestor: Option<Box<Selector>>Ancestor sub-selector — candidate’s a11y tree parent chain
(recursive ancestors, excluding self) must contain at least one
node matching this sub-selector. Different from
Modifiers::inside (geometric bounds-containment): ancestor
walks the a11y tree parent chain — structural filter, not spatial.
Use this to disambiguate same-label candidates living under
different ancestor subtrees (e.g. a bottom tab and a sub-tab both
labeled "Tracking").
nth: Option<usize>Pick the nth match (0-indexed) from the surviving candidates.
first: Option<bool>Pick the first match (true) — overridden by nth if both set.
last: Option<bool>Pick the last match (true) — overridden by nth if both set.