From 87e36ee44e6e25b6e61cf9988b56b85a221c3a33 Mon Sep 17 00:00:00 2001 From: Matthew Lam Date: Sun, 8 Mar 2026 19:14:24 -0400 Subject: [PATCH] chore: add accessibility labels and hints to UI components Add VoiceOver support to FocusChecklistRow, FocusTagPickerView, and ProgressRing. Decorative SF Symbol icons are hidden from assistive technology, interactive elements have labels/hints, and the progress ring exposes its value as a percentage. --- App/UI/Components/FocusChecklistRow.swift | 3 +++ App/UI/Components/FocusTagPickerView.swift | 3 +++ App/UI/Components/ProgressRing.swift | 3 +++ 3 files changed, 9 insertions(+) diff --git a/App/UI/Components/FocusChecklistRow.swift b/App/UI/Components/FocusChecklistRow.swift index 60c62ba..71502ad 100644 --- a/App/UI/Components/FocusChecklistRow.swift +++ b/App/UI/Components/FocusChecklistRow.swift @@ -19,6 +19,7 @@ struct FocusChecklistRow: View { Image(systemName: "checkmark") .font(.tenxTinyBold) .foregroundStyle(AppColors.background) + .accessibilityHidden(true) } } @@ -26,5 +27,7 @@ struct FocusChecklistRow: View { .font(.tenxBody) .foregroundStyle(AppColors.textPrimary) } + .accessibilityElement(children: .combine) + .accessibilityLabel("\(title), \(isCompleted ? "completed" : "not completed")") } } diff --git a/App/UI/Components/FocusTagPickerView.swift b/App/UI/Components/FocusTagPickerView.swift index 88945dd..eedeb1b 100644 --- a/App/UI/Components/FocusTagPickerView.swift +++ b/App/UI/Components/FocusTagPickerView.swift @@ -17,6 +17,7 @@ struct FocusTagPickerView: View { .font(.tenxSmall) Image(systemName: "chevron.down") .font(.tenxMicroSemibold) + .accessibilityHidden(true) } .foregroundStyle(AppColors.textSecondary) .padding(.horizontal, 10) @@ -24,5 +25,7 @@ struct FocusTagPickerView: View { .background(AppColors.surface.opacity(0.8)) .clipShape(Capsule()) } + .accessibilityLabel(tag?.label ?? "Tag, none selected") + .accessibilityHint("Opens a menu to select a focus tag") } } diff --git a/App/UI/Components/ProgressRing.swift b/App/UI/Components/ProgressRing.swift index 8599769..f6a9a56 100644 --- a/App/UI/Components/ProgressRing.swift +++ b/App/UI/Components/ProgressRing.swift @@ -12,5 +12,8 @@ struct ProgressRing: View { .stroke(AppColors.accent, style: StrokeStyle(lineWidth: 8, lineCap: .round)) .rotationEffect(.degrees(-90)) } + .accessibilityElement(children: .ignore) + .accessibilityLabel("Focus progress") + .accessibilityValue("\(Int(progress * 100)) percent") } }