mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-10-04 16:02:02 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user