From a520cdfa4b092ad81c30fa17d23d045984ab8902 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Wed, 6 Feb 2019 14:37:58 -0600 Subject: [PATCH] added accessibility label for sidebar cell --- NetNewsWire/MainWindow/Sidebar/Cell/SidebarCell.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/NetNewsWire/MainWindow/Sidebar/Cell/SidebarCell.swift b/NetNewsWire/MainWindow/Sidebar/Cell/SidebarCell.swift index fa1f25bd9..3b991f398 100644 --- a/NetNewsWire/MainWindow/Sidebar/Cell/SidebarCell.swift +++ b/NetNewsWire/MainWindow/Sidebar/Cell/SidebarCell.swift @@ -127,6 +127,16 @@ class SidebarCell : NSTableCellView { let layout = SidebarCellLayout(appearance: cellAppearance, cellSize: bounds.size, shouldShowImage: shouldShowImage, textField: textField, unreadCountView: unreadCountView) layoutWith(layout) } + + override func accessibilityLabel() -> String? { + if unreadCount > 0 { + let unreadLabel = NSLocalizedString("unread", comment: "Unread label for accessiblity") + return "\(name) \(unreadCount) \(unreadLabel)" + } else { + return name + } + } + } private extension SidebarCell {