From c684824b10e179573b47ef5e2fe0ff028bf79b49 Mon Sep 17 00:00:00 2001 From: Talon Date: Thu, 18 Jun 2026 16:08:34 +0200 Subject: [PATCH] fix(macos): make channel/user/chat/activity views reachable by VoiceOver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Setting accessibilityLabel on the NSScrollView wrappers turned them into leaf elements, so VoiceOver never descended into the document views (NSOutlineView/NSTableView/NSTextView) inside. Tab still worked because the key-view loop is independent of the accessibility tree. Also removed the redundant setAccessibilityRole calls on the document views — they already default to those roles, and re-setting the same role can interfere with the view's custom a11y implementation. Matches the pattern already used in ConnectWindowController, whose server table VoiceOver reaches correctly. --- .../macOS/VoiceCatMac/Windows/MainWindowController.swift | 8 -------- 1 file changed, 8 deletions(-) diff --git a/clients/apple/macOS/VoiceCatMac/Windows/MainWindowController.swift b/clients/apple/macOS/VoiceCatMac/Windows/MainWindowController.swift index 84d9dab..f8f524d 100644 --- a/clients/apple/macOS/VoiceCatMac/Windows/MainWindowController.swift +++ b/clients/apple/macOS/VoiceCatMac/Windows/MainWindowController.swift @@ -190,13 +190,11 @@ final class MainWindowController: NSWindowController, NSWindowDelegate { channelOutlineView.doubleAction = #selector(channelDoubleClicked) channelOutlineView.target = self channelOutlineView.setAccessibilityLabel("Channel list") - channelOutlineView.setAccessibilityRole(.outline) let sv = NSScrollView() sv.documentView = channelOutlineView sv.hasVerticalScroller = true sv.borderType = .noBorder - sv.setAccessibilityLabel("Channel list") let menu = NSMenu() menu.delegate = self @@ -214,7 +212,6 @@ final class MainWindowController: NSWindowController, NSWindowDelegate { userTableView.doubleAction = #selector(userDoubleClicked) userTableView.target = self userTableView.setAccessibilityLabel("Users in current channel") - userTableView.setAccessibilityRole(.table) let menu = NSMenu() menu.delegate = self @@ -224,13 +221,11 @@ final class MainWindowController: NSWindowController, NSWindowDelegate { sv.documentView = userTableView sv.hasVerticalScroller = true sv.borderType = .noBorder - sv.setAccessibilityLabel("Users in current channel") return sv } private func buildChatPanel() -> NSView { chatTextView.setAccessibilityLabel("Chat messages") - chatTextView.setAccessibilityRole(.textArea) chatTextView.textContainerInset = NSSize(width: 4, height: 4) chatTextView.isAutomaticQuoteSubstitutionEnabled = false @@ -238,7 +233,6 @@ final class MainWindowController: NSWindowController, NSWindowDelegate { sv.documentView = chatTextView sv.hasVerticalScroller = true sv.borderType = .noBorder - sv.setAccessibilityLabel("Chat messages") return sv } @@ -249,13 +243,11 @@ final class MainWindowController: NSWindowController, NSWindowDelegate { activityTableView.dataSource = self activityTableView.delegate = self activityTableView.setAccessibilityLabel("Activity log") - activityTableView.setAccessibilityRole(.table) let sv = NSScrollView() sv.documentView = activityTableView sv.hasVerticalScroller = true sv.borderType = .noBorder - sv.setAccessibilityLabel("Activity log") return sv }