From 5e95f9e37db8796d4d52ed2a520cd7e39ca47eea Mon Sep 17 00:00:00 2001 From: aiongg Date: Tue, 17 Nov 2026 05:14:47 +0000 Subject: [PATCH] DIAG: the node an AccessKit Focus request names, as route_access finds it (every_displayed_shortcut_dispatches_from_where_focus_usually_is) --- crates/ui-contract/src/runtime/keys/route.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/ui-contract/src/runtime/keys/route.rs b/crates/ui-contract/src/runtime/keys/route.rs index adbdfea98..52ef15798 100644 --- a/crates/ui-contract/src/runtime/keys/route.rs +++ b/crates/ui-contract/src/runtime/keys/route.rs @@ -609,6 +609,18 @@ fn nudge_of(key: Key, mods: Mods) -> Option<(Vec2, Mods)> { /// Routes an AccessKit action request to the owner of its target node, whatever the focus (9.2 rule 2). fn route_access(ctx: &Context, request: &Action, nodes: &HashMap, routed: &mut HashMap, Routed>, activated: &mut IdMap) { + if matches!(request.kind(), ActionKind::Focus) { + let found = nodes.get(&request.node()); + eprintln!( + "DIAG every_displayed_shortcut_dispatches_from_where_focus_usually_is: access focus node {} found {} owner {:?} part {:?} focusable {:?} nodes {}", + request.node(), + found.is_some(), + found.map(|node| node.owner), + found.and_then(|node| node.part), + found.map(|node| node.focusable), + nodes.len() + ); + } let Some(node) = nodes.get(&request.node()).copied() else { return }; let owner = Some(node.owner); // A request that only scrolls (a screen reader's Scroll Into View) shows the node and leaves focus where it is.