Fix UI tests: remove tab content accessibility identifiers that override child identifiers
The .accessibilityIdentifier() on TabView tab content propagated to ALL child views in the accessibility tree, overriding identifiers like mood_header and settings_header. Tab buttons are already accessible via labels (Day, Month, etc.) so these aren't needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -28,31 +28,26 @@ struct MainTabView: View {
|
||||
.tabItem {
|
||||
Label(String(localized: "content_view_tab_main"), systemImage: "list.dash")
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.Tab.day)
|
||||
|
||||
monthView
|
||||
.tabItem {
|
||||
Label(String(localized: "content_view_tab_month"), systemImage: "calendar")
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.Tab.month)
|
||||
|
||||
yearView
|
||||
.tabItem {
|
||||
Label(String(localized: "content_view_tab_filter"), systemImage: "line.3.horizontal.decrease.circle")
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.Tab.year)
|
||||
|
||||
insightsView
|
||||
.tabItem {
|
||||
Label(String(localized: "content_view_tab_insights"), systemImage: "lightbulb.fill")
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.Tab.insights)
|
||||
|
||||
SettingsTabView()
|
||||
.tabItem {
|
||||
Label("Settings", systemImage: "gear")
|
||||
}
|
||||
.accessibilityIdentifier(AccessibilityID.Tab.settings)
|
||||
}
|
||||
.accentColor(textColor)
|
||||
.sheet(isPresented: $needsOnboarding, onDismiss: { }, content: {
|
||||
|
||||
Reference in New Issue
Block a user