feat: added tooltips to the missing elements and enabled accessibility on some not natively supported (#2321)

This commit is contained in:
Serhiy Mytrovtsiy
2025-01-17 18:32:29 +01:00
parent 8de91d9d74
commit 08c4ab9f97
13 changed files with 63 additions and 11 deletions

View File

@@ -165,6 +165,8 @@ private class CalendarView: NSStackView {
self.day = Calendar.current.component(.day, from: Date())
super.init(frame: NSRect(x: 0, y: 0, width: width, height: width - 32))
self.setAccessibilityElement(true)
self.toolTip = localizedString("Calendar")
self.spacing = 0
self.orientation = .vertical
@@ -442,6 +444,8 @@ private class ClockView: NSStackView {
)
self.wantsLayer = true
self.layer?.cornerRadius = 2
self.setAccessibilityElement(true)
self.toolTip = "\(clock.name): \(clock.formatted())"
self.clockView.widthAnchor.constraint(equalToConstant: 34).isActive = true