Skip to content

fix(accessibility): 在两种侧栏布局中暴露当前工作区名称和选中状态 - #128

Merged
chenbstack merged 2 commits into
chenbstack:mainfrom
defia:fix/workspace-selection-accessibility
Oct 8, 2026
Merged

chenbstack merged 2 commits into
chenbstack:mainfrom
defia:fix/workspace-selection-accessibility

Conversation

@defia

@defia defia commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

当前工作区缺少稳定的辅助功能查询入口。外部辅助功能客户端无法可靠区分工作区名称、运行状态和当前选中项;顶部切换按钮原本只在侧栏折叠时存在,布局切换也会让查询目标消失。

此改动让顶部工作区切换按钮在侧栏展开和折叠时都显示,统一使用 current-workspace 标识;辅助功能 label 和 value 都使用与界面相同的 Workspace.displayName,跟随工作区选择、重命名和自动名称更新。工作区卡片同时提供 workspace-<UUID> 稳定标识,当前卡片具有 selected trait,保留原状态 value。

外部客户端可按标准 AX 属性定位,例如:

*[AXIdentifier="current-workspace"]

读取 AXValue 获得工作区显示名称;也可以读取名称属性。上述 CSS 风格表达式属于客户端查询语言,Glint 只暴露标准辅助功能语义。

验证:macOS arm64 Debug 构建通过,git diff --check 通过。改动仅涉及 ContentView.swift 和 SidebarView.swift。尚未对更新版本进行运行中 AX 树和布局的人工验收,现有 Glint 会话没有重启。

@defia defia changed the title fix(accessibility): 暴露工作区选中状态和稳定标识 fix(accessibility): 在两种侧栏布局中暴露当前工作区名称和选中状态 Oct 7, 2026
@chenbstack
chenbstack merged commit 6566db1 into chenbstack:main Oct 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants