Expand description
Pure, zero-allocation focusability, modal-overlay, and subtree query helpers over &NodeStore.
Functions§
- first_
focusable_ in_ subtree - first_
matching_ in_ subtree - Finds the first node inside
root’s subtree matchingpredicatein document pre-order, pruning dead,display: none(peroracle), closed-overlay and disabled subtrees, so the predicate only judges the node itself (e.g.is_focusable_self). - is_
composite_ aria_ group - Returns
truewhenidis a composite roving-focus group (Interaction::roving_focus_groupor a composite ARIA widget role). - is_
focusable_ node - Returns
truewhenidis live and focusable itself (is_focusable_self, tested first: it is O(1) and rejects almost every node), displayed (peroracle: cascaded@media/@container/ statedisplayon native scenes, static rows where the platform applies CSS), enabled, inside no closed overlay, notvisibility: hidden(CSS-inherited) and not inert under the topmost modal (SemanticStyleOracle::is_inert). The one focusability rule: engine focus moves and the runtime’sfocusablescene fact both read it. - is_
focusable_ self - Whether live
idis itself a focus target (text entry,focusable, atab_indexor focus listeners), without the O(depth) ancestor checks ofis_focusable_node: for callers that already pruneddisplay: none, closed-overlay and disabled nodes and their subtrees (thefirst_matching_in_subtreeDFS, tab-order walks). - is_
open_ modal - Whether
idis an open modalOverlayin the top layer (is_top_layer_root). - is_
subtree_ closed_ overlay - Returns
truewhenidor any ancestor owns a closedOverlayrow. - is_
subtree_ disabled - Returns
truewhenidor any ancestor hasInteraction::disabled == true. - is_
tabbable_ self is_focusable_selfwithout a negativetab_index(same pruned-DFS contract).- is_
text_ entry_ node - Returns
truewhenidis a live text-entry / text-key-capturing control (Interaction::captures_text_keys). - is_
within_ subtree - Returns
truewhennodeequalsancestoror descends fromancestor. - press_
focus_ target - Focus target of a primary press on
hitfor every host that moves focus on press: the nearest focusable ancestor-or-self (Noneblurs), orcurrentunchanged when the press lands inside anInteraction::keep_focus_on_pressnode first (HTMLmousedownpreventDefault). - topmost_
open_ modal - Finds the topmost (last in document order) open modal
Overlayin the top layer (zero allocs on a warmdfs_scratch). The single definition ([INV:top-layer-single-definition]) shared by focus management, semantic queries, and — throughTopLayerIndex, which applieswalk_top_layer_chainwith the same oracle and document order — layout, hit-testing, scroll latching and accessibility.