From adc7b0d350b2df9fab08128d047536612b9e8346 Mon Sep 17 00:00:00 2001 From: defia Date: Wed, 7 Oct 2026 15:05:50 +0800 Subject: [PATCH 1/2] fix(accessibility): expose workspace selection and stable identifiers --- Glint/Chrome/ContentView.swift | 2 ++ Glint/Chrome/SidebarView.swift | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Glint/Chrome/ContentView.swift b/Glint/Chrome/ContentView.swift index 31846604..26c819b9 100644 --- a/Glint/Chrome/ContentView.swift +++ b/Glint/Chrome/ContentView.swift @@ -1699,6 +1699,8 @@ private struct WorkspaceSwitcher: View { .fixedSize() } .buttonStyle(.plain) + .accessibilityIdentifier("current-workspace") + .accessibilityLabel(Text(verbatim: currentName)) .onHover { hover = $0 } .popover(isPresented: $isOpen, arrowEdge: .bottom) { WorkspaceSwitcherPopover { isOpen = false } diff --git a/Glint/Chrome/SidebarView.swift b/Glint/Chrome/SidebarView.swift index e10d5669..1efd9682 100644 --- a/Glint/Chrome/SidebarView.swift +++ b/Glint/Chrome/SidebarView.swift @@ -817,7 +817,8 @@ private struct WorkspaceCard: View { // name (verbatim — user data); value = the same status line the // card renders visually, with the elapsed time spelled out. .accessibilityElement(children: .combine) - .accessibilityAddTraits(.isButton) + .accessibilityAddTraits(active ? [.isButton, .isSelected] : [.isButton]) + .accessibilityIdentifier("workspace-\(ws.id.uuidString)") .accessibilityLabel(Text(verbatim: ws.displayName)) .accessibilityValue(Text(verbatim: archived ? String(localized: "Archived") From 9780b434d909161901773470dbb908bbf77e2383 Mon Sep 17 00:00:00 2001 From: defia Date: Wed, 7 Oct 2026 16:35:10 +0800 Subject: [PATCH 2/2] fix(accessibility): keep current workspace name available in both sidebar layouts --- Glint/Chrome/ContentView.swift | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/Glint/Chrome/ContentView.swift b/Glint/Chrome/ContentView.swift index 26c819b9..282c5e7b 100644 --- a/Glint/Chrome/ContentView.swift +++ b/Glint/Chrome/ContentView.swift @@ -405,20 +405,15 @@ struct ToolbarHeader: View { GlintBrandMark() .padding(.trailing, 10) - // With the sidebar collapsed the workspace switcher joins - // the leading capsule (Photos-style cluster) instead of - // floating as its own island; a hairline seam separates it - // from the brand. - if store.sidebarCollapsed { - if floating { - Rectangle() - .fill(Theme.overlay(0.10)) - .frame(width: 1, height: 16) - } - WorkspaceSwitcher() - .padding(.leading, floating ? 0 : 6) - .transition(.opacity.combined(with: .move(edge: .leading))) + // Keep the current workspace available in both sidebar + // layouts, including its stable accessibility identity. + if floating { + Rectangle() + .fill(Theme.overlay(0.10)) + .frame(width: 1, height: 16) } + WorkspaceSwitcher() + .padding(.leading, floating ? 0 : 6) } .liquidGlass(enabled: floating, cornerRadius: 19, tint: Theme.glassTint) .arrowPointer() @@ -1701,6 +1696,7 @@ private struct WorkspaceSwitcher: View { .buttonStyle(.plain) .accessibilityIdentifier("current-workspace") .accessibilityLabel(Text(verbatim: currentName)) + .accessibilityValue(Text(verbatim: currentName)) .onHover { hover = $0 } .popover(isPresented: $isOpen, arrowEdge: .bottom) { WorkspaceSwitcherPopover { isOpen = false }