From ee3ef42498fd899ac071e74c4cb679fcb80f5bed Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Sat, 30 May 2026 14:13:18 +0700 Subject: [PATCH] fix(datagrid): announce grid selection to all assistive tech; label dialog controls (#1490) --- CHANGELOG.md | 1 + TablePro/Views/Results/Selection/GridSelectionController.swift | 2 +- TablePro/Views/Sidebar/FavoriteEditDialog.swift | 1 + TablePro/Views/Sidebar/TableOperationDialog.swift | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8105d916..5796dbd08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- VoiceOver reliability: grid selection changes are announced to all assistive technologies (not only when VoiceOver was already on), the drop and truncate dialog toggles describe their effect, and the favorite query editor is labeled. (#1490) - Tab moves keyboard focus between the window panes (sidebar, results, inspector) by rebuilding the key view loop when the window appears. (#1490) - The license activation sheet focuses the key field on open, the SQL review sheet closes with Escape even while the editor has focus, and the integration token sheet focuses its Done button. (#1490) - Copy with Headers now has a default keyboard shortcut (Cmd+Option+C), so it works and is discoverable from the keyboard instead of showing in the Edit menu with no key. (#1490) diff --git a/TablePro/Views/Results/Selection/GridSelectionController.swift b/TablePro/Views/Results/Selection/GridSelectionController.swift index bb166e00a..aacff4dcd 100644 --- a/TablePro/Views/Results/Selection/GridSelectionController.swift +++ b/TablePro/Views/Results/Selection/GridSelectionController.swift @@ -39,7 +39,7 @@ final class GridSelectionController { } private func postAccessibilityAnnouncement(for newSelection: GridSelection) { - guard NSWorkspace.shared.isVoiceOverEnabled, let tableView else { return } + guard let tableView else { return } let announcement: String if newSelection.isEmpty { announcement = String(localized: "Cell selection cleared") diff --git a/TablePro/Views/Sidebar/FavoriteEditDialog.swift b/TablePro/Views/Sidebar/FavoriteEditDialog.swift index 1e420363f..b39f10ca5 100644 --- a/TablePro/Views/Sidebar/FavoriteEditDialog.swift +++ b/TablePro/Views/Sidebar/FavoriteEditDialog.swift @@ -81,6 +81,7 @@ internal struct FavoriteEditDialog: View { LabeledContent("Query") { TextEditor(text: $query) .font(.system(.body, design: .monospaced)) + .accessibilityLabel(String(localized: "Query")) .frame(height: 160) .scrollContentBackground(.hidden) .padding(4) diff --git a/TablePro/Views/Sidebar/TableOperationDialog.swift b/TablePro/Views/Sidebar/TableOperationDialog.swift index ea470fcf7..499b99404 100644 --- a/TablePro/Views/Sidebar/TableOperationDialog.swift +++ b/TablePro/Views/Sidebar/TableOperationDialog.swift @@ -112,6 +112,7 @@ struct TableOperationDialog: View { } .toggleStyle(.checkbox) .disabled(ignoreFKDisabled) + .accessibilityHint(String(localized: "Skips foreign key constraint checks for this operation")) if let description = ignoreFKDescription { Text(description) @@ -130,6 +131,7 @@ struct TableOperationDialog: View { } .toggleStyle(.checkbox) .disabled(cascadeDisabled) + .accessibilityHint(cascadeDescription) Text(cascadeDescription) .font(.subheadline)