Add missing accessibility identifiers to all interactive UI elements
Audit found ~50+ interactive elements (buttons, toggles, pickers, alerts, links) missing accessibility identifiers across 13 view files. Added centralized ID definitions and applied them to every entry detail button, guided reflection control, settings toggle, paywall unlock button, subscription/IAP button, lock screen control, and photo action dialog.
This commit is contained in:
@@ -54,6 +54,7 @@ struct MonthDetailView: View {
|
||||
Image(systemName: "square.and.arrow.up")
|
||||
.foregroundColor(textColor)
|
||||
.padding(.trailing)
|
||||
.accessibilityIdentifier(AccessibilityID.MonthDetail.shareButton)
|
||||
.onTapGesture {
|
||||
let impactMed = UIImpactFeedbackGenerator(style: .heavy)
|
||||
impactMed.impactOccurred()
|
||||
@@ -97,6 +98,7 @@ struct MonthDetailView: View {
|
||||
showUpdateEntryAlert = false
|
||||
selectedEntry = nil
|
||||
})
|
||||
.accessibilityIdentifier(AccessibilityID.MonthDetail.moodButton(mood.strValue))
|
||||
}
|
||||
|
||||
if let selectedEntry = selectedEntry,
|
||||
@@ -107,6 +109,7 @@ struct MonthDetailView: View {
|
||||
updateEntries()
|
||||
showUpdateEntryAlert = false
|
||||
})
|
||||
.accessibilityIdentifier(AccessibilityID.MonthDetail.deleteButton)
|
||||
}
|
||||
|
||||
Button(String(localized: "content_view_fill_in_missing_entry_cancel"), role: .cancel, action: {
|
||||
|
||||
@@ -324,6 +324,7 @@ struct MonthView: View {
|
||||
.clipShape(RoundedRectangle(cornerRadius: 14))
|
||||
}
|
||||
.padding(.horizontal, 24)
|
||||
.accessibilityIdentifier(AccessibilityID.Paywall.monthUnlockButton)
|
||||
}
|
||||
.padding(.vertical, 24)
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
Reference in New Issue
Block a user