diff --git a/DuckDuckGo/SyncPromoView.swift b/DuckDuckGo/SyncPromoView.swift index a77a410ad2..b9539aa78f 100644 --- a/DuckDuckGo/SyncPromoView.swift +++ b/DuckDuckGo/SyncPromoView.swift @@ -24,6 +24,7 @@ import DuckUI struct SyncPromoView: View { let viewModel: SyncPromoViewModel + @State private var isAccessibilityHidden = true var body: some View { ZStack(alignment: .topTrailing) { @@ -31,6 +32,8 @@ struct SyncPromoView: View { Group { Image(viewModel.image) .scaledToFit() + .accessibilityHidden(true) + Text(viewModel.title) .padding(.top, 4) .frame(maxWidth: .infinity) @@ -48,6 +51,7 @@ struct SyncPromoView: View { Text(viewModel.secondaryButtonTitle) } .buttonStyle(SecondaryFillButtonStyle(compact: true, fullWidth: false)) + .accessibilityLabel(viewModel.secondaryButtonTitle) Button { viewModel.primaryButtonAction?() @@ -55,6 +59,7 @@ struct SyncPromoView: View { Text(viewModel.primaryButtonTitle) } .buttonStyle(PrimaryButtonStyle(compact: true, fullWidth: false)) + .accessibilityLabel(viewModel.primaryButtonTitle) } .padding(.top, 12) @@ -81,6 +86,7 @@ struct SyncPromoView: View { .alignmentGuide(.top) { dimension in dimension[.top] } + .accessibilityHidden(true) } .background( RoundedRectangle(cornerRadius: 8) @@ -88,6 +94,13 @@ struct SyncPromoView: View { ) .padding(.horizontal, 20) .padding(.bottom, 12) + .accessibilityHidden(isAccessibilityHidden) + .onAppear { + // Delay accessibility activation for maestro + DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) { + isAccessibilityHidden = false + } + } } }