diff options
| author | Mitchell Hashimoto <m@mitchellh.com> | 2025-10-10 08:38:08 -0700 |
|---|---|---|
| committer | Mitchell Hashimoto <m@mitchellh.com> | 2025-10-10 08:38:50 -0700 |
| commit | 9dac88248f9761ef69ecb522ce8249b27b513d1c (patch) | |
| tree | 668f67aad2b68307fe6283ea38b75c5f9c0d6c3f | |
| parent | 47f3c946401529ec7b2c90405be46ab7a4123629 (diff) | |
macos: ax for update info
| -rw-r--r-- | macos/Sources/Features/Update/UpdateBadge.swift | 10 | ||||
| -rw-r--r-- | macos/Sources/Features/Update/UpdatePill.swift | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/macos/Sources/Features/Update/UpdateBadge.swift b/macos/Sources/Features/Update/UpdateBadge.swift index afd0849be..a4a95f411 100644 --- a/macos/Sources/Features/Update/UpdateBadge.swift +++ b/macos/Sources/Features/Update/UpdateBadge.swift @@ -14,6 +14,12 @@ struct UpdateBadge: View { @State private var rotationAngle: Double = 0 var body: some View { + badgeContent + .accessibilityLabel(model.text) + } + + @ViewBuilder + private var badgeContent: some View { switch model.state { case .downloading(let download): if let expectedLength = download.expectedLength, expectedLength > 0 { @@ -38,11 +44,15 @@ struct UpdateBadge: View { .onDisappear { rotationAngle = 0 } + } else { + EmptyView() } default: if let iconName = model.iconName { Image(systemName: iconName) + } else { + EmptyView() } } } diff --git a/macos/Sources/Features/Update/UpdatePill.swift b/macos/Sources/Features/Update/UpdatePill.swift index 3b48ac218..ff4af97dd 100644 --- a/macos/Sources/Features/Update/UpdatePill.swift +++ b/macos/Sources/Features/Update/UpdatePill.swift @@ -53,6 +53,7 @@ struct UpdatePill: View { Text(model.text) .font(Font(textFont)) .lineLimit(1) + .truncationMode(.tail) .frame(width: textWidth) } .padding(.horizontal, 8) @@ -66,6 +67,7 @@ struct UpdatePill: View { } .buttonStyle(.plain) .help(model.text) + .accessibilityLabel(model.text) } /// Calculated width for the text to prevent resizing during progress updates |
