i18n, a11y, IME · palette copy reads i18n with builtin en/zh; dialog and palette Enter run on the field's key-down action, so an IME-kept Enter never submits; Button, IconButton, TextInput, Tabs, EditorTabs, StatusBarItem and palette rows name their role and label

This commit is contained in:
ZacharyZhang-NY committed 2026-10-02 12:58:43 -04:00
1 parent 8fd7b8ab87
commit 4580e3b075
15 files changed
+257 -75

No files matched your search

+6 -2
View File
@@ -2,8 +2,8 @@ use std::rc::Rc;
use gpui::{
Animation, AnimationExt, AnyElement, App, ElementId, FontWeight, InteractiveElement,
IntoElement, MouseButton, ParentElement, RenderOnce, SharedString, StatefulInteractiveElement,
Styled, Window, div, prelude::*,
IntoElement, MouseButton, ParentElement, RenderOnce, Role, SharedString,
StatefulInteractiveElement, Styled, Window, div, prelude::*,
};
use crate::{
@@ -150,6 +150,9 @@ impl RenderOnce for Tabs {
let pick = pick.clone();
div()
.id(("tab", ix))
.role(Role::Tab)
.aria_selected(on)
.aria_label(tab.label.clone())
.relative()
.flex()
.items_center()
@@ -195,6 +198,7 @@ impl RenderOnce for Tabs {
let (keys, key_pick) = (tabs.clone(), pick.clone());
let strip = div()
.id((self.id.clone(), "strip"))
.role(Role::TabList)
.track_focus(&focus)
.relative()
.flex()