From a99db2ce13c7c2c558df76c6f38f5b2bd5a38b06 Mon Sep 17 00:00:00 2001 From: yoriswind Date: Mon, 23 Nov 2026 10:08:56 -0800 Subject: [PATCH] Select gradient mode buttons by their accessibility role --- crates/ui-egui/tests/gradient_stop_color_mode_menu.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/tests/gradient_stop_color_mode_menu.rs b/crates/ui-egui/tests/gradient_stop_color_mode_menu.rs index 3bb31a263d..dd6a7b3df5 100644 --- a/crates/ui-egui/tests/gradient_stop_color_mode_menu.rs +++ b/crates/ui-egui/tests/gradient_stop_color_mode_menu.rs @@ -110,7 +110,9 @@ impl Scene { self.buttons.clear(); let update = output.platform_output.accesskit_update.as_ref().expect("AccessKit enabled"); for (_, node) in &update.nodes { - if let Some((label, bounds)) = node.label().zip(node.bounds()) { + if node.role() == egui::accesskit::Role::Button + && let Some((label, bounds)) = node.label().zip(node.bounds()) + { self.buttons .push((label.to_owned(), Rect::from_min_max(pos2(bounds.x0 as f32, bounds.y0 as f32), pos2(bounds.x1 as f32, bounds.y1 as f32)))); }