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:
@@ -49,6 +49,17 @@ enum AccessibilityID {
|
||||
static let noteButton = "entry_detail_note_button"
|
||||
static let noteArea = "entry_detail_note_area"
|
||||
static let moodGrid = "entry_detail_mood_grid"
|
||||
static let reflectionBeginButton = "entry_detail_reflection_begin"
|
||||
static let reflectionCard = "entry_detail_reflection_card"
|
||||
static let photoButton = "entry_detail_photo_button"
|
||||
static let photoPlaceholder = "entry_detail_photo_placeholder"
|
||||
static let photoImage = "entry_detail_photo_image"
|
||||
static let photoTakeButton = "entry_detail_photo_take"
|
||||
static let photoChooseButton = "entry_detail_photo_choose"
|
||||
static let photoRemoveButton = "entry_detail_photo_remove"
|
||||
static let photoCancelButton = "entry_detail_photo_cancel"
|
||||
static let deleteConfirmButton = "entry_detail_delete_confirm"
|
||||
static let deleteCancelButton = "entry_detail_delete_cancel"
|
||||
}
|
||||
|
||||
// MARK: - Note Editor
|
||||
@@ -56,6 +67,7 @@ enum AccessibilityID {
|
||||
static let textEditor = "note_editor_text"
|
||||
static let saveButton = "note_editor_save"
|
||||
static let cancelButton = "note_editor_cancel"
|
||||
static let keyboardDoneButton = "note_editor_keyboard_done"
|
||||
}
|
||||
|
||||
// MARK: - Guided Reflection
|
||||
@@ -67,6 +79,9 @@ enum AccessibilityID {
|
||||
static let backButton = "guided_reflection_back"
|
||||
static let saveButton = "guided_reflection_save"
|
||||
static let cancelButton = "guided_reflection_cancel"
|
||||
static let infoButton = "guided_reflection_info"
|
||||
static let discardButton = "guided_reflection_discard"
|
||||
static let keepEditingButton = "guided_reflection_keep_editing"
|
||||
static func questionLabel(step: Int) -> String {
|
||||
"guided_reflection_question_\(step)"
|
||||
}
|
||||
@@ -75,6 +90,11 @@ enum AccessibilityID {
|
||||
static func chip(label: String) -> String {
|
||||
"guided_reflection_chip_\(label)"
|
||||
}
|
||||
// Info view
|
||||
static let infoDoneButton = "guided_reflection_info_done"
|
||||
static let cbtLearnMoreLink = "guided_reflection_cbt_learn_more"
|
||||
static let actLearnMoreLink = "guided_reflection_act_learn_more"
|
||||
static let baLearnMoreLink = "guided_reflection_ba_learn_more"
|
||||
}
|
||||
|
||||
// MARK: - Settings
|
||||
@@ -92,6 +112,14 @@ enum AccessibilityID {
|
||||
static let bypassSubscriptionToggle = "settings_bypass_subscription"
|
||||
static let eulaButton = "settings_eula"
|
||||
static let privacyPolicyButton = "settings_privacy_policy"
|
||||
static let hapticFeedbackToggle = "settings_haptic_feedback_toggle"
|
||||
static let deleteToggle = "settings_delete_toggle"
|
||||
static let privacyLockToggle = "settings_privacy_lock_toggle"
|
||||
static let healthSyncToggle = "settings_health_sync_toggle"
|
||||
static let weatherToggle = "settings_weather_toggle"
|
||||
static let reminderTimePicker = "settings_reminder_time_picker"
|
||||
static let reminderSaveButton = "settings_reminder_save"
|
||||
static let reminderCancelButton = "settings_reminder_cancel"
|
||||
}
|
||||
|
||||
// MARK: - Customize
|
||||
@@ -126,6 +154,10 @@ enum AccessibilityID {
|
||||
static let monthOverlay = "paywall_month_overlay"
|
||||
static let yearOverlay = "paywall_year_overlay"
|
||||
static let insightsOverlay = "paywall_insights_overlay"
|
||||
static let monthUnlockButton = "paywall_month_unlock"
|
||||
static let yearUnlockButton = "paywall_year_unlock"
|
||||
static let insightsUnlockButton = "paywall_insights_unlock"
|
||||
static let reportsUnlockButton = "paywall_reports_unlock"
|
||||
}
|
||||
|
||||
// MARK: - Day View Section Headers
|
||||
@@ -149,6 +181,15 @@ enum AccessibilityID {
|
||||
static let shareButton = "month_share_button"
|
||||
}
|
||||
|
||||
// MARK: - Month Detail
|
||||
enum MonthDetail {
|
||||
static let shareButton = "month_detail_share"
|
||||
static let deleteButton = "month_detail_delete"
|
||||
static func moodButton(_ mood: String) -> String {
|
||||
"month_detail_mood_\(mood.lowercased())"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Year View
|
||||
enum YearView {
|
||||
static let heatmap = "year_heatmap"
|
||||
@@ -187,6 +228,36 @@ enum AccessibilityID {
|
||||
static let privacyConfirmation = "reports_privacy_confirmation"
|
||||
static let minimumEntriesWarning = "reports_minimum_entries_warning"
|
||||
static let exportDataButton = "reports_export_data_button"
|
||||
static let retryButton = "reports_retry_button"
|
||||
}
|
||||
|
||||
// MARK: - Purchase / Subscription
|
||||
enum Purchase {
|
||||
static let manageSubscriptionButton = "purchase_manage_subscription"
|
||||
static let changePlanButton = "purchase_change_plan"
|
||||
static let restorePurchasesButton = "purchase_restore"
|
||||
static let subscribeButton = "purchase_subscribe"
|
||||
}
|
||||
|
||||
// MARK: - IAP Warning
|
||||
enum IAPWarning {
|
||||
static let subscribeButton = "iap_warning_subscribe"
|
||||
}
|
||||
|
||||
// MARK: - Lock Screen
|
||||
enum LockScreen {
|
||||
static let unlockButton = "lock_screen_unlock"
|
||||
static let tryAgainButton = "lock_screen_try_again"
|
||||
static let cancelButton = "lock_screen_cancel"
|
||||
static func passcodeButton(_ digit: Int) -> String {
|
||||
"lock_screen_passcode_\(digit)"
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Full Screen Photo
|
||||
enum FullScreenPhoto {
|
||||
static let closeButton = "full_screen_photo_close"
|
||||
static let dismissArea = "full_screen_photo_dismiss"
|
||||
}
|
||||
|
||||
// MARK: - Common
|
||||
|
||||
Reference in New Issue
Block a user