Repository navigation
fix(accessibility): 在两种侧栏布局中暴露当前工作区名称和选中状态 - #128
Merged
chenbstack merged 2 commits intoOct 8, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
当前工作区缺少稳定的辅助功能查询入口。外部辅助功能客户端无法可靠区分工作区名称、运行状态和当前选中项;顶部切换按钮原本只在侧栏折叠时存在,布局切换也会让查询目标消失。
此改动让顶部工作区切换按钮在侧栏展开和折叠时都显示,统一使用
current-workspace标识;辅助功能 label 和 value 都使用与界面相同的Workspace.displayName,跟随工作区选择、重命名和自动名称更新。工作区卡片同时提供workspace-<UUID>稳定标识,当前卡片具有 selected trait,保留原状态 value。外部客户端可按标准 AX 属性定位,例如:
读取
AXValue获得工作区显示名称;也可以读取名称属性。上述 CSS 风格表达式属于客户端查询语言,Glint 只暴露标准辅助功能语义。验证:macOS arm64 Debug 构建通过,
git diff --check通过。改动仅涉及ContentView.swift和SidebarView.swift。尚未对更新版本进行运行中 AX 树和布局的人工验收,现有 Glint 会话没有重启。