From 9263dac40cf14e967bf03921e4500864419fd67a Mon Sep 17 00:00:00 2001 From: Jacob Fu <141651335+FuJacob@users.noreply.github.com> Date: Sat, 30 May 2026 19:29:41 -0700 Subject: [PATCH] Address Greptile review on onboarding showcase - Hide the decorative showcase from VoiceOver via .accessibilityHidden(true) - Reset typedCount inside the ghost card's fade-out so it doesn't snap blank - Identify emoji candidate rows by stable alias instead of array index --- Cotabby/UI/Onboarding/OnboardingFeatureShowcase.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cotabby/UI/Onboarding/OnboardingFeatureShowcase.swift b/Cotabby/UI/Onboarding/OnboardingFeatureShowcase.swift index 227df558..a2ed4538 100644 --- a/Cotabby/UI/Onboarding/OnboardingFeatureShowcase.swift +++ b/Cotabby/UI/Onboarding/OnboardingFeatureShowcase.swift @@ -20,6 +20,9 @@ struct OnboardingFeatureShowcase: View { GhostTextDemoCard() EmojiPickerDemoCard() } + // Purely decorative looping demo: hide it from VoiceOver so the + // mid-animation text fragments are never read out to AT users. + .accessibilityHidden(true) } } @@ -136,6 +139,7 @@ private struct GhostTextDemoCard: View { withAnimation(.easeInOut(duration: 0.30)) { showGhost = false accepted = false + typedCount = 0 } try? await Task.sleep(nanoseconds: 600 * nsPerMillisecond) } @@ -277,7 +281,7 @@ private struct DemoEmojiPopup: View { Divider() VStack(spacing: 0) { - ForEach(Array(candidates.enumerated()), id: \.offset) { index, candidate in + ForEach(Array(candidates.enumerated()), id: \.element.alias) { index, candidate in DemoEmojiRow(glyph: candidate.glyph, alias: candidate.alias, isSelected: index == 0) } }