Complete accessibility identifier coverage across all 152 project files
Exhaustive file-by-file audit of every Swift file in the project (iOS app, Watch app, Widget extension). Every interactive UI element — buttons, toggles, pickers, links, menus, tap gestures, text editors, color pickers, photo pickers — now has an accessibilityIdentifier for XCUITest automation. 46 files changed across Shared/, Onboarding/, Watch App/, and Widget targets. Added ~100 new ID definitions covering settings debug controls, export/photo views, sharing templates, customization subviews, onboarding flows, tip modals, widget voting buttons, and watch mood buttons.
This commit is contained in:
@@ -117,6 +117,7 @@ struct MonthDetailView: View {
|
||||
selectedEntry = nil
|
||||
showUpdateEntryAlert = false
|
||||
})
|
||||
.accessibilityIdentifier(AccessibilityID.MonthDetail.cancelButton)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,6 +154,7 @@ struct MonthDetailView: View {
|
||||
LazyVGrid(columns: columns, spacing: 25) {
|
||||
ForEach(entries, id: \.self) { entry in
|
||||
listViewEntry(forEntry: entry)
|
||||
.accessibilityIdentifier(AccessibilityID.MonthDetail.entryCell(DateFormattingCache.shared.string(for: entry.forDate, format: .dateMedium)))
|
||||
.onTapGesture(perform: {
|
||||
if entry.canEdit {
|
||||
selectedEntry = entry
|
||||
|
||||
@@ -378,6 +378,7 @@ struct MonthView: View {
|
||||
.preferredColorScheme(theme.preferredColorScheme)
|
||||
#if DEBUG
|
||||
// Triple-tap to toggle demo mode for video recording
|
||||
.accessibilityIdentifier(AccessibilityID.MonthView.debugDemoToggle)
|
||||
.onTapGesture(count: 3) {
|
||||
if demoManager.isDemoMode {
|
||||
demoManager.stopDemoMode()
|
||||
@@ -591,6 +592,7 @@ struct MonthCard: View, Equatable {
|
||||
}
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
.accessibilityIdentifier(AccessibilityID.MonthView.statsToggleButton)
|
||||
.accessibilityLabel("\(Random.monthName(fromMonthInt: month)) \(String(year)), \(showStats ? "expanded" : "collapsed")")
|
||||
.accessibilityHint("Double tap to toggle statistics")
|
||||
|
||||
@@ -661,6 +663,7 @@ struct MonthCard: View, Equatable {
|
||||
.fill(theme.currentTheme.secondaryBGColor)
|
||||
)
|
||||
.contentShape(Rectangle())
|
||||
.accessibilityIdentifier(AccessibilityID.MonthView.dayCell(dateString: "\(month)_\(year)"))
|
||||
.onTapGesture {
|
||||
onTap()
|
||||
}
|
||||
@@ -867,6 +870,7 @@ extension MonthView {
|
||||
}
|
||||
.padding(.top, 60)
|
||||
.padding(.trailing)
|
||||
.accessibilityIdentifier(AccessibilityID.MonthView.settingsButton)
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user