Skip to content
Merged
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
12 changes: 12 additions & 0 deletions App/Features/YearProgress/YearProgressView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ struct YearProgressView: View {
.clipShape(Circle())
}
.buttonStyle(.plain)
.accessibilityLabel("Close")
.accessibilityHint("Dismisses the year progress view")

Spacer()

Expand All @@ -79,8 +81,11 @@ struct YearProgressView: View {
Image(systemName: "chevron.down")
.font(.tenxMicroSemibold)
.foregroundStyle(AppColors.textSecondary)
.accessibilityHidden(true)
}
}
.accessibilityLabel("Year \(viewModel.selectedYear)")
.accessibilityHint("Opens a menu to select a different year")

Spacer()

Expand All @@ -95,6 +100,8 @@ struct YearProgressView: View {
.clipShape(Circle())
}
.buttonStyle(.plain)
.accessibilityLabel("Share")
.accessibilityHint("Shares the year progress as an image")
}
}

Expand Down Expand Up @@ -160,6 +167,7 @@ struct YearProgressView: View {
.font(.tenxCaption)
.foregroundStyle(AppColors.textSecondary)
.padding(.top, 4)
.accessibilityLabel("\(summary.daysLeft) days left, \(String(format: "%.1f", summary.yearCompletionPercent)) percent complete")
}

private func dayAccessibilityLabel(for day: YearDayDot) -> String {
Expand Down Expand Up @@ -303,6 +311,8 @@ private struct YearProgressDetailView: View {
.foregroundStyle(AppColors.textSecondary)
}
.buttonStyle(.plain)
.accessibilityLabel("Previous day")
.accessibilityHint("Shows the previous day's focuses")
.disabled(!canMoveBackward)
.opacity(canMoveBackward ? 1 : 0.3)

Expand All @@ -322,6 +332,8 @@ private struct YearProgressDetailView: View {
.foregroundStyle(AppColors.textSecondary)
}
.buttonStyle(.plain)
.accessibilityLabel("Next day")
.accessibilityHint("Shows the next day's focuses")
.disabled(!canMoveForward)
.opacity(canMoveForward ? 1 : 0.3)
}
Expand Down
Loading