Skip to content

Commit ddc5e98

Browse files
authored
Fix AccessKit focus fallback when there's no focused widget (#1174)
When no widget is focused, it's important to return the window node as the AccessKit focus, not the root widget.
1 parent 68dff90 commit ddc5e98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

masonry_core/src/passes/accessibility.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ pub(crate) fn run_accessibility_pass(root: &mut RenderRoot, scale_factor: f64) -
155155
focus: root
156156
.global_state
157157
.focused_widget
158-
.unwrap_or(root.root.id())
159-
.into(),
158+
.map(Into::into)
159+
.unwrap_or(root.window_node_id),
160160
};
161161

162162
let (root_widget, root_state, root_properties) = {

0 commit comments

Comments
 (0)