From 8ed5ddd47b30a6d013591c4e101650d7373af229 Mon Sep 17 00:00:00 2001 From: Lucas Batista Vargas Date: Wed, 25 Nov 2026 12:37:13 -0300 Subject: [PATCH] test(ui-egui): restore the_tab_strip_buttons_have_names test (#7317, #1110) (#7577) --- crates/ui-egui/src/ribbon/tests.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/crates/ui-egui/src/ribbon/tests.rs b/crates/ui-egui/src/ribbon/tests.rs index 4fecbcdb5b..d1c75079a6 100644 --- a/crates/ui-egui/src/ribbon/tests.rs +++ b/crates/ui-egui/src/ribbon/tests.rs @@ -342,6 +342,20 @@ fn language_names_resolve_aliases_and_tags() { assert!(c.extra.is_some() && !c.listed.contains(&true)); } +/// #1110: the strip's drawn buttons have names for screen readers: Share, and the "»" that +/// holds the tabs that don't fit ("More tabs", not a glyph). +#[test] +fn the_tab_strip_buttons_have_names() { + let app = WordApp::new(Session::new(wordcraft_doc::Document::from_text("Text")), crate::Services::default()); + let mut h = app_harness(app, vec2(760.0, 700.0)); + h.get_by_role_and_label(egui::accesskit::Role::Button, tl!("Share")); + let more = h.get_by_role_and_label(egui::accesskit::Role::Button, tl!("More tabs")); + more.click(); + crate::test_harness::frames(&mut h, 2); + // The menu lists a tab that didn't fit (View is among the last on a narrow strip). + assert!(h.query(By::new().role(egui::accesskit::Role::MenuItem).label(tl!("View"))).is_some(), "the » menu lists the tabs left out"); +} + /// Each contextual tab shows on the tab strip while its object is selected and leaves with the /// selection. #[test]