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:
Trey T
2026-03-26 07:59:52 -05:00
parent 8cc9400d65
commit e7648ddd8a
13 changed files with 131 additions and 6 deletions

View File

@@ -31,7 +31,8 @@ struct GuidedReflectionInfoView: View {
title: String(localized: "guided_reflection_about_cbt_title"),
body: String(localized: "guided_reflection_about_cbt_body"),
citation: "Beck, J. S. (2020). Cognitive Behavior Therapy: Basics and Beyond, 3rd ed.",
url: cbtURL
url: cbtURL,
linkID: AccessibilityID.GuidedReflection.cbtLearnMoreLink
)
// ACT
@@ -41,7 +42,8 @@ struct GuidedReflectionInfoView: View {
title: String(localized: "guided_reflection_about_act_title"),
body: String(localized: "guided_reflection_about_act_body"),
citation: "Harris, R. (2009). ACT Made Simple. New Harbinger Publications.",
url: actURL
url: actURL,
linkID: AccessibilityID.GuidedReflection.actLearnMoreLink
)
// BA
@@ -51,7 +53,8 @@ struct GuidedReflectionInfoView: View {
title: String(localized: "guided_reflection_about_ba_title"),
body: String(localized: "guided_reflection_about_ba_body"),
citation: "Martell, C. R., Dimidjian, S., & Herman-Dunn, R. (2010). Behavioral Activation for Depression.",
url: baURL
url: baURL,
linkID: AccessibilityID.GuidedReflection.baLearnMoreLink
)
// Disclaimer
@@ -69,6 +72,7 @@ struct GuidedReflectionInfoView: View {
Button(String(localized: "Done")) {
dismiss()
}
.accessibilityIdentifier(AccessibilityID.GuidedReflection.infoDoneButton)
}
}
}
@@ -83,7 +87,8 @@ struct GuidedReflectionInfoView: View {
title: String,
body: String,
citation: String,
url: URL
url: URL,
linkID: String
) -> some View {
VStack(alignment: .leading, spacing: 12) {
HStack(spacing: 10) {
@@ -113,6 +118,7 @@ struct GuidedReflectionInfoView: View {
}
.font(.caption)
}
.accessibilityIdentifier(linkID)
}
}
.padding()