feat(a11y): label the remaining lists and let VoiceOver open files from the tree

Editor tabs are tabs named by file (and unsaved state) with a named close
button; Info rows read as 'label, value'; keyboard shortcut rows as
'action, keys'; SSH hosts as 'name, address' with their expanded state.
File-tree rows open on the press, which assistive tech cannot send, so
they take its press action directly: a screen reader could select a file
but never open it.
This commit is contained in:
l0ng-ai
2026-09-30 03:09:48 +08:00
parent cdd3f3c2cd
commit bb0089f43d
5 changed files with 53 additions and 0 deletions
+8
View File
@@ -3443,6 +3443,8 @@ impl Tty7App {
let muted = cx.theme().muted_foreground;
let close = div()
.id(("editor-file-tab-close", pos))
.role(gpui::Role::Button)
.aria_label(format!("{} {name}", t(L10nKey::Close)))
.flex_none()
.size(px(slot))
.flex()
@@ -3474,6 +3476,12 @@ impl Tty7App {
});
div()
.id(("editor-file-tab", pos))
.role(gpui::Role::Tab)
.aria_label(match dirty {
true => format!("{name}, {}", t(L10nKey::SettingsUnsaved)),
false => name.to_string(),
})
.aria_selected(active)
.group(group.clone())
.occlude()
.flex_none()