Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- VoiceOver announces the active tab title when you switch between window tabs. (#1490)
- Opening a query tab no longer pulls keyboard focus away from the sidebar or another control; the editor takes focus only when nothing else holds it. VoiceOver now labels the SQL editor and the Clear and Format buttons. (#1490)
- The connection form opens with the Name field focused, Return or the Down arrow in the welcome search moves to the connection list, and focus returns to the list after a sheet closes, so you can set up a connection without the mouse. (#1490)
- Escape now dismisses search-based sheets and popovers (database switcher, quick switcher, column and connection pickers). Pressing Escape clears the search text first; a second Escape closes the sheet. (#1490)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ extension MainContentCoordinator {
evictionTask = nil

syncSidebarToSelectedTab()
announceActiveTabToVoiceOver()

Self.lifecycleLogger.debug(
"[switch] coordinator.handleWindowDidBecomeKey done connId=\(self.connectionId, privacy: .public) totalMs=\(Int(Date().timeIntervalSince(t0) * 1_000))"
Expand Down Expand Up @@ -82,6 +83,20 @@ extension MainContentCoordinator {
)
}

/// Announce the active tab title to VoiceOver when the window becomes key,
/// so assistive-technology users get the same context the window title gives.
private func announceActiveTabToVoiceOver() {
guard let title = tabManager.selectedTab?.title, !title.isEmpty else { return }
NSAccessibility.post(
element: NSApp as Any,
notification: .announcementRequested,
userInfo: [
.announcement: title,
.priority: NSAccessibilityPriorityLevel.medium.rawValue,
]
)
}

// MARK: - Sidebar Sync

/// Update the window-scoped sidebar selection so the active table tab
Expand Down
Loading