v1.1 polish: accessibility, error logging, localization, and code quality sweep
- Wrap 30+ production print() statements in #if DEBUG guards across 18 files - Add VoiceOver labels, hints, and traits to Watch app, Live Activities, widgets - Add .accessibilityAddTraits(.isButton) to 15+ onTapGesture views - Add text alternatives for color-only indicators (progress dots, mood circles) - Localize raw string literals in NoteEditorView, EntryDetailView, widgets - Replace 25+ silent try? with do/catch + AppLogger error logging - Replace hardcoded font sizes with semantic Dynamic Type fonts - Fix FIXME in IconPickerView (log icon change errors) - Extract magic animation delays to named constants across 8 files - Add widget empty state "Log your first mood!" messaging - Hide decorative images from VoiceOver, add labels to ColorPickers - Remove stale TODO in Color+Codable (alpha change deferred for migration) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -182,6 +182,7 @@ struct CreateWidgetView: View {
|
||||
AnalyticsManager.shared.track(.widgetColorUpdated(part: "background"))
|
||||
}
|
||||
.labelsHidden()
|
||||
.accessibilityLabel(String(localized: "create_widget_background_color"))
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.colorPicker("bg"))
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
@@ -193,6 +194,7 @@ struct CreateWidgetView: View {
|
||||
AnalyticsManager.shared.track(.widgetColorUpdated(part: "inner"))
|
||||
}
|
||||
.labelsHidden()
|
||||
.accessibilityLabel(String(localized: "create_widget_inner_color"))
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.colorPicker("inner"))
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
@@ -204,6 +206,7 @@ struct CreateWidgetView: View {
|
||||
AnalyticsManager.shared.track(.widgetColorUpdated(part: "outline"))
|
||||
}
|
||||
.labelsHidden()
|
||||
.accessibilityLabel(String(localized: "create_widget_face_outline_color"))
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.colorPicker("stroke"))
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
@@ -217,6 +220,7 @@ struct CreateWidgetView: View {
|
||||
AnalyticsManager.shared.track(.widgetColorUpdated(part: "left_eye"))
|
||||
}
|
||||
.labelsHidden()
|
||||
.accessibilityLabel(String(localized: "create_widget_view_left_eye_color"))
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.colorPicker("leftEye"))
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
@@ -228,6 +232,7 @@ struct CreateWidgetView: View {
|
||||
AnalyticsManager.shared.track(.widgetColorUpdated(part: "right_eye"))
|
||||
}
|
||||
.labelsHidden()
|
||||
.accessibilityLabel(String(localized: "create_widget_view_right_eye_color"))
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.colorPicker("rightEye"))
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
@@ -239,6 +244,7 @@ struct CreateWidgetView: View {
|
||||
AnalyticsManager.shared.track(.widgetColorUpdated(part: "mouth"))
|
||||
}
|
||||
.labelsHidden()
|
||||
.accessibilityLabel(String(localized: "create_widget_view_mouth_color"))
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.colorPicker("mouth"))
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
@@ -264,14 +270,20 @@ struct CreateWidgetView: View {
|
||||
.onTapGesture {
|
||||
update(background: bg)
|
||||
}
|
||||
.accessibilityAddTraits(.isButton)
|
||||
.accessibilityLabel(String(localized: "Select background \(bg.rawValue)"))
|
||||
}
|
||||
mixBG
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.randomBackgroundButton)
|
||||
.onTapGesture {
|
||||
update(background: .random)
|
||||
}
|
||||
.accessibilityAddTraits(.isButton)
|
||||
.accessibilityLabel(String(localized: "Random background"))
|
||||
Divider()
|
||||
ColorPicker("", selection: $customWidget.bgOverlayColor)
|
||||
.labelsHidden()
|
||||
.accessibilityLabel(String(localized: "Background overlay color"))
|
||||
.accessibilityIdentifier(AccessibilityID.CustomWidget.colorPicker("bgOverlay"))
|
||||
}
|
||||
.padding()
|
||||
@@ -287,6 +299,7 @@ struct CreateWidgetView: View {
|
||||
.onTapGesture(perform: {
|
||||
showLeftEyeImagePicker.toggle()
|
||||
})
|
||||
.accessibilityAddTraits(.isButton)
|
||||
.foregroundColor(textColor)
|
||||
.foregroundColor(textColor)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
@@ -296,6 +309,7 @@ struct CreateWidgetView: View {
|
||||
.onTapGesture(perform: {
|
||||
showRightEyeImagePicker.toggle()
|
||||
})
|
||||
.accessibilityAddTraits(.isButton)
|
||||
.foregroundColor(textColor)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
Divider()
|
||||
@@ -304,6 +318,7 @@ struct CreateWidgetView: View {
|
||||
.onTapGesture(perform: {
|
||||
showMuthImagePicker.toggle()
|
||||
})
|
||||
.accessibilityAddTraits(.isButton)
|
||||
.foregroundColor(textColor)
|
||||
.foregroundColor(textColor)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
|
||||
Reference in New Issue
Block a user