Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions App/Features/Settings/DiagnosticsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,20 @@ struct DiagnosticsView: View {
Button("Copy diagnostics") {
copyDiagnostics()
}
.accessibilityHint("Copies diagnostic information to clipboard")
.listRowBackground(AppColors.surface)

Button("Force widget refresh") {
let store = TenXStore(context: modelContext)
WidgetSnapshotService(store: store).refreshSnapshot(todayKey: DayKey.make())
}
.accessibilityHint("Regenerates the widget snapshot from current data")
.listRowBackground(AppColors.surface)

Button("Reload widget timelines") {
WidgetCenter.shared.reloadTimelines(ofKind: SharedConstants.widgetKind)
}
.accessibilityHint("Tells the system to reload all widget timelines")
.listRowBackground(AppColors.surface)
}
}
Expand Down
4 changes: 4 additions & 0 deletions App/Features/Settings/NotificationTimePickerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ struct NotificationTimePickerView: View {
}
}
.buttonStyle(.plain)
.accessibilityLabel("Morning reminder time")
.accessibilityValue(formattedTime)
.accessibilityHint("Opens a time picker to change the morning reminder time")
.sheet(isPresented: $isPickerPresented) {
TimePickerSheet(hour: $hour, minute: $minute)
.presentationDetents([.height(320)])
Expand Down Expand Up @@ -70,6 +73,7 @@ private struct TimePickerSheet: View {
dismiss()
}
.font(.tenxBody)
.accessibilityHint("Closes the time picker")
}
.padding(.horizontal, 20)

Expand Down
7 changes: 7 additions & 0 deletions App/Features/Settings/SettingsSheetView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ struct SettingsSheetView: View {

Toggle("Midday check-in", isOn: $middayReminderEnabled)
.font(.tenxBody)
.accessibilityHint(middayReminderEnabled ? "Disables the midday check-in reminder" : "Enables a midday reminder to check your focus progress")
.onChange(of: middayReminderEnabled) { _, _ in
scheduleNotifications()
}

Toggle("Evening reflection", isOn: $eveningReminderEnabled)
.font(.tenxBody)
.accessibilityHint(eveningReminderEnabled ? "Disables the evening reflection reminder" : "Enables an evening reminder to reflect on your day")
.onChange(of: eveningReminderEnabled) { _, _ in
scheduleNotifications()
}
Expand All @@ -68,13 +70,15 @@ struct SettingsSheetView: View {
NotificationScheduler.shared.openSystemSettings()
}
.buttonStyle(PrimaryButtonStyle())
.accessibilityHint("Opens the system notification settings for this app")
}

#if DEBUG
Button("Send Test Notification") {
viewModel.scheduleTest()
}
.buttonStyle(PrimaryButtonStyle())
.accessibilityHint("Sends a test notification to verify delivery")
#endif
}

Expand All @@ -87,6 +91,7 @@ struct SettingsSheetView: View {
dismiss()
}
.buttonStyle(PrimaryButtonStyle())
.accessibilityHint("Returns to the onboarding carousel immediately")

Text("Returns to the onboarding carousel immediately.")
.font(.tenxCaption)
Expand Down Expand Up @@ -132,6 +137,8 @@ struct SettingsSheetView: View {
.clipShape(Circle())
}
.buttonStyle(.plain)
.accessibilityLabel("Close")
.accessibilityHint("Dismisses the settings screen")
}
}

Expand Down
Loading