Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Tell VoiceOver each permission's state with its name

Țugui Dragoș0bc774828466
diff --git a/Peel/Views/Home/HomePermissionsView.swift b/Peel/Views/Home/HomePermissionsView.swift
index 2d7599ce..34d4c31c 100644
--- a/Peel/Views/Home/HomePermissionsView.swift
+++ b/Peel/Views/Home/HomePermissionsView.swift
@@ -98,8 +98,11 @@ struct HomePermissionsContent: View {
.onHover { pointingAt = $0 ? permission : nil }
.help(help(for: permission))
VStack(alignment: .leading, spacing: 1) {
+ let status = changing?.progress ?? home.status(of: permission)
HStack(spacing: 5) {
name(permission, state: state)
+ // VoiceOver hears the state with the name it belongs to, so the line under it is left out.
+ .accessibilityValue(Text(status))
InfoNote(
name: String(localized: permission.title),
detail: Text(home.detail(of: permission)),
@@ -107,10 +110,11 @@ struct HomePermissionsContent: View {
isAlbum: true
)
}
- Text(changing?.progress ?? home.status(of: permission))
+ Text(status)
.font(.system(size: 11.5, weight: .medium))
.foregroundStyle(state.isMissing && changing == nil ? Album.red : .secondary)
.fixedSize(horizontal: false, vertical: true)
+ .accessibilityHidden(true)
}
}
.frame(maxWidth: .infinity, alignment: .leading)
diff --git a/Peel/Views/Home/HomeView.swift b/Peel/Views/Home/HomeView.swift
index 7d89535c..a2f8e2d8 100644
--- a/Peel/Views/Home/HomeView.swift
+++ b/Peel/Views/Home/HomeView.swift
@@ -65,6 +65,7 @@ struct HomeContent: View {
.foregroundStyle(Album.ink)
.lineLimit(1)
.minimumScaleFactor(0.7)
+ .accessibilityAddTraits(.isHeader)
}
if let device = home.device {
deviceCard(device).padding(.top, 38)