From 8f044924abae36eb30fc5f2fcea105d1833b8ece Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Wed, 30 Sep 2026 02:12:13 +0800 Subject: [PATCH] feat(a11y): expose the sidebar's tabs and the detail panel's tabs to screen readers Each is a tab with its full title and selected state, and pressable by assistive tech. Before, VoiceOver saw the window, its buttons and the terminal, and nothing between them. --- src/ui/tab_sidebar.rs | 5 +++++ src/ui/tab_strip.rs | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/ui/tab_sidebar.rs b/src/ui/tab_sidebar.rs index 5f4d5884..92ab463a 100644 --- a/src/ui/tab_sidebar.rs +++ b/src/ui/tab_sidebar.rs @@ -981,6 +981,11 @@ impl Tty7App { let row = h_flex() .id(("tab-row", i)) + // What a screen reader announces and presses: the full + // title, not the elided one drawn. + .role(gpui::Role::Tab) + .aria_label(SharedString::from(title_text.to_string())) + .aria_selected(is_active) .group(SharedString::from(format!("tab-row-{i}"))) .cursor_pointer() .on_drag(DragTab, { diff --git a/src/ui/tab_strip.rs b/src/ui/tab_strip.rs index 0cda6da9..5bee8ab8 100644 --- a/src/ui/tab_strip.rs +++ b/src/ui/tab_strip.rs @@ -1441,6 +1441,9 @@ impl Tty7App { }; div() .id(("right-panel-tab", tab as usize)) + .role(gpui::Role::Tab) + .aria_label(t(label_key)) + .aria_selected(current) // The press must not start a window drag from the title bar // the tabs sit in. .occlude()