commit 3953a675688e73a81e5fe092dd6603815f1be208 parent 12f6865d087ac7a9210728e6fe055e08e60b9717 Author: Marc Stibane <marc@taler.net> Date: Sun, 11 Feb 2024 17:22:32 +0100 descriptive alt text for progress indicator Diffstat:
4 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/TalerWallet1/Views/HelperViews/LaunchAnimationView.swift b/TalerWallet1/Views/HelperViews/LaunchAnimationView.swift @@ -9,13 +9,17 @@ struct LaunchAnimationView: View { var body: some View { ZStack { Color(.systemGray6).ignoresSafeArea() - RotatingTaler(size: (350 < UIScreen.screenWidth) ? 200 : 250, rotationEnabled: $rotationEnabled) + RotatingTaler(size: (350 < UIScreen.screenWidth) ? 200 : 250, + progress: true, + rotationEnabled: $rotationEnabled) +// .accessibilityLabel("Progress indicator") } } } struct RotatingTaler: View { let size: CGFloat + let progress: Bool @Binding var rotationEnabled: Bool @State private var rotationDirection = false #if TALER_WALLET @@ -34,7 +38,7 @@ struct RotatingTaler: View { .scaledToFit() .frame(width: size, height: size) .rotationEffect(rotationDirection ? Angle(degrees: 0) : Angle(degrees: 900)) - .accessibilityLabel("Taler Logo") // decorative logo - with button function + .accessibilityLabel(progress ? "In progress" : "Taler Logo") // decorative logo - with button function .onReceive(animationTimer) { timerValue in if rotationEnabled { withAnimation(.easeInOut(duration: 1.9)) { diff --git a/TalerWallet1/Views/HelperViews/LoadingView.swift b/TalerWallet1/Views/HelperViews/LoadingView.swift @@ -18,7 +18,9 @@ struct LoadingView: View { var body: some View { VStack(alignment: .center) { Spacer() - RotatingTaler(size: 100, rotationEnabled: $rotationEnabled) + RotatingTaler(size: 100, progress: true, + rotationEnabled: $rotationEnabled) +// .accessibilityLabel("Progress indicator") .onTapGesture(count: 2) { rotationEnabled.toggle() } diff --git a/TalerWallet1/Views/Settings/AboutView.swift b/TalerWallet1/Views/Settings/AboutView.swift @@ -32,9 +32,11 @@ struct AboutView: View { let walletCore = WalletCore.shared Group { List { - RotatingTaler(size: 100, rotationEnabled: $rotationEnabled) + RotatingTaler(size: 100, progress: false, + rotationEnabled: $rotationEnabled) .frame(maxWidth: .infinity, alignment: .center) - .onTapGesture(count: 1) { rotationEnabled.toggle() } +// .accessibilityLabel("Progress indicator") + .onTapGesture(count: 1) { rotationEnabled.toggle() } SettingsItem(name: "Visit the taler.net website", id1: "web", description: minimalistic ? nil : String(localized: "More info about Gnu Taler in general...")) { } .accessibilityAddTraits(.isLink) diff --git a/TalerWallet1/Views/Transactions/TransactionSummaryV.swift b/TalerWallet1/Views/Transactions/TransactionSummaryV.swift @@ -254,8 +254,10 @@ struct TransactionSummaryV: View { let title = EMPTYSTRING Text(title) .talerFont(.body) - RotatingTaler(size: 100, rotationEnabled: $rotationEnabled) + RotatingTaler(size: 100, progress: true, + rotationEnabled: $rotationEnabled) .frame(maxWidth: .infinity, alignment: .center) +// .accessibilityLabel("Progress indicator") case .withdrawal(let withdrawalTransaction): Group { let details = withdrawalTransaction.details if pending {