diff --git a/Shared/Views/AddMoodHeaderView.swift b/Shared/Views/AddMoodHeaderView.swift index 090884b..2426e9f 100644 --- a/Shared/Views/AddMoodHeaderView.swift +++ b/Shared/Views/AddMoodHeaderView.swift @@ -69,7 +69,6 @@ struct AddMoodHeaderView: View { .background(theme.currentTheme.secondaryBGColor) .cornerRadius(Constants.viewsCornerRaidus, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight]) .fixedSize(horizontal: false, vertical: true) - .accessibilityIdentifier(AccessibilityID.DayView.moodHeader) } @ViewBuilder @@ -125,13 +124,13 @@ struct HorizontalVotingView: View { } .buttonStyle(MoodButtonStyle()) .frame(maxWidth: .infinity) + .accessibilityElement(children: .ignore) + .accessibilityAddTraits(.isButton) .accessibilityIdentifier(AccessibilityID.MoodButton.id(for: mood.widgetDisplayName)) .accessibilityLabel(mood.strValue) .accessibilityHint(String(localized: "Select this mood")) } } - .accessibilityElement(children: .contain) - .accessibilityLabel(String(localized: "Mood selection")) } } @@ -167,8 +166,6 @@ struct CardVotingView: View { } } .frame(height: 190) - .accessibilityElement(children: .contain) - .accessibilityLabel(String(localized: "Mood selection")) } private func cardButton(for mood: Mood, width: CGFloat) -> some View { @@ -190,6 +187,8 @@ struct CardVotingView: View { ) } .buttonStyle(CardButtonStyle()) + .accessibilityElement(children: .ignore) + .accessibilityAddTraits(.isButton) .accessibilityIdentifier(AccessibilityID.MoodButton.id(for: mood.widgetDisplayName)) .accessibilityLabel(mood.strValue) .accessibilityHint(String(localized: "Select this mood")) @@ -230,13 +229,13 @@ struct StackedVotingView: View { ) } .buttonStyle(CardButtonStyle()) + .accessibilityElement(children: .ignore) + .accessibilityAddTraits(.isButton) .accessibilityIdentifier(AccessibilityID.MoodButton.id(for: mood.widgetDisplayName)) .accessibilityLabel(mood.strValue) .accessibilityHint(String(localized: "Select this mood")) } } - .accessibilityElement(children: .contain) - .accessibilityLabel(String(localized: "Mood selection")) } } @@ -317,6 +316,8 @@ struct AuraVotingView: View { } } .buttonStyle(AuraButtonStyle(color: color)) + .accessibilityElement(children: .ignore) + .accessibilityAddTraits(.isButton) .accessibilityIdentifier(AccessibilityID.MoodButton.id(for: mood.widgetDisplayName)) .accessibilityLabel(mood.strValue) .accessibilityHint(String(localized: "Select this mood")) @@ -355,8 +356,6 @@ struct OrbitVotingView: View { .onDisappear { centerPulse = 1.0 } - .accessibilityElement(children: .contain) - .accessibilityLabel(String(localized: "Mood selection")) } private func orbitalRing(radius: CGFloat, centerX: CGFloat, centerY: CGFloat) -> some View { @@ -408,6 +407,8 @@ struct OrbitVotingView: View { } .buttonStyle(OrbitButtonStyle(color: color)) .position(x: posX, y: posY) + .accessibilityElement(children: .ignore) + .accessibilityAddTraits(.isButton) .accessibilityIdentifier(AccessibilityID.MoodButton.id(for: mood.widgetDisplayName)) .accessibilityLabel(mood.strValue) .accessibilityHint(String(localized: "Select this mood")) @@ -696,6 +697,8 @@ struct NeonEqualizerBar: View { } .buttonStyle(NeonBarButtonStyle(isPressed: $isPressed)) .frame(maxWidth: .infinity) + .accessibilityElement(children: .ignore) + .accessibilityAddTraits(.isButton) .accessibilityIdentifier(AccessibilityID.NeonMoodButton.id(for: mood.widgetDisplayName)) .accessibilityLabel(mood.strValue) .accessibilityHint(String(localized: "Select this mood"))