taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit 0cce5fa1a9ee50d25750f5541de48408a72cbf6c
parent 298a43b0217c1c775e7ef3380a32ff33c167a8a0
Author: Marc Stibane <marc@taler.net>
Date:   Tue,  1 Apr 2025 23:27:12 +0200

a11y

Diffstat:
MTalerWallet1/Views/Actions/ActionsSheet.swift | 2+-
MTalerWallet1/Views/Actions/Banking/DepositAmountView.swift | 4++--
MTalerWallet1/Views/Actions/Peer2peer/P2PSubjectV.swift | 4++--
MTalerWallet1/Views/Balances/BalanceCellV.swift | 2+-
MTalerWallet1/Views/Balances/BalancesPendingRowV.swift | 6+++---
MTalerWallet1/Views/HelperViews/AmountInputV.swift | 2+-
MTalerWallet1/Views/HelperViews/Buttons.swift | 20++++++++++----------
MTalerWallet1/Views/HelperViews/CurrencyInputView.swift | 2+-
MTalerWallet1/Views/HelperViews/LaunchAnimationView.swift | 6+++---
MTalerWallet1/Views/HelperViews/QRCodeDetailView.swift | 2+-
MTalerWallet1/Views/HelperViews/ScopePicker.swift | 6+++---
MTalerWallet1/Views/HelperViews/SelectDays.swift | 2+-
MTalerWallet1/Views/Main/ErrorView.swift | 2+-
MTalerWallet1/Views/Settings/Bank/BankListView.swift | 2+-
MTalerWallet1/Views/Settings/Bank/BankSectionView.swift | 4++--
MTalerWallet1/Views/Settings/Exchange/ExchangeListView.swift | 2+-
MTalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift | 2+-
MTalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift | 2+-
MTalerWallet1/Views/Sheets/Payment/PaymentView.swift | 4++--
MTalerWallet1/Views/Sheets/QRSheet.swift | 4++--
MTalerWallet1/Views/Sheets/Sheet.swift | 2+-
MTalerWallet1/Views/Transactions/ManualDetailsV.swift | 2+-
MTalerWallet1/Views/Transactions/ManualDetailsWireV.swift | 20++++++++++----------
MTalerWallet1/Views/Transactions/QRcodesForPayto.swift | 2+-
MTalerWallet1/Views/Transactions/TransactionPayDetailV.swift | 2+-
MTalerWallet1/Views/Transactions/TransactionRowView.swift | 8++++----
MTalerWallet1/Views/Transactions/TransactionSummaryV.swift | 8++++----
MTalerWallet1/Views/Transactions/TransactionsListView.swift | 2+-
28 files changed, 63 insertions(+), 63 deletions(-)

diff --git a/TalerWallet1/Views/Actions/ActionsSheet.swift b/TalerWallet1/Views/Actions/ActionsSheet.swift @@ -73,7 +73,7 @@ struct ActionsSheet: View { } } .buttonStyle(TalerButtonStyle(type: .bordered, narrow: false, aligned: .center)) - .accessibilityHint(String(localized: "Will go to the demo shop website.", comment: "VoiceOver")) + .accessibilityHint(String(localized: "Will go to the demo shop website.", comment: "a11y")) .accessibilityAddTraits(.isLink) .padding(.bottom, 20) } diff --git a/TalerWallet1/Views/Actions/Banking/DepositAmountView.swift b/TalerWallet1/Views/Actions/Banking/DepositAmountView.swift @@ -137,7 +137,7 @@ struct DepositAmountView: View { let disabled = insufficient || amountToTransfer.isZero Text("Available: \(availableStr.0)") - .accessibilityLabel("Available: \(availableStr.1)") + .accessibilityLabel(Text("Available: \(availableStr.1)", comment: "a11y")) .talerFont(.title3) .frame(maxWidth: .infinity, alignment: .trailing) .padding(.horizontal) @@ -162,7 +162,7 @@ struct DepositAmountView: View { : WalletColors().negative) .padding(4) let hint = String(localized: "enabled when amount is non-zero, but not higher than your available amount", - comment: "VoiceOver") + comment: "a11y") Button(buttonTitle(amountToTransfer)) { startDeposit(balance.scopeInfo) } // TODO: use exchange scope .buttonStyle(TalerButtonStyle(type: .prominent, disabled: disabled || depositStarted)) .padding(.horizontal) diff --git a/TalerWallet1/Views/Actions/Peer2peer/P2PSubjectV.swift b/TalerWallet1/Views/Actions/Peer2peer/P2PSubjectV.swift @@ -102,7 +102,7 @@ struct P2PSubjectV: View { .talerFont(.body) } } - let enterSubject = String(localized: "Enter subject") + let enterSubject = String(localized: "Enter subject", comment: "Purpose, a11y") let enterColon = String("\(enterSubject):") if !minimalistic { Text(enterSubject) // Purpose @@ -159,7 +159,7 @@ struct P2PSubjectV: View { .accessibilityLabel(buttonTitle.1) .buttonStyle(TalerButtonStyle(type: .prominent, disabled: disabled)) .disabled(disabled) - .accessibilityHint(disabled ? String(localized: "enabled when subject and expiration are set", comment: "VoiceOver") + .accessibilityHint(disabled ? String(localized: "enabled when subject and expiration are set", comment: "a11y") : EMPTYSTRING) }.padding(.horizontal) } // ScrollVStack // .scrollBounceBehavior(.basedOnSize) needs iOS 16.4 diff --git a/TalerWallet1/Views/Balances/BalanceCellV.swift b/TalerWallet1/Views/Balances/BalanceCellV.swift @@ -78,7 +78,7 @@ struct BalanceCellV: View { NavigationLink { balanceDest } label: { balanceCell .accessibilityElement(children: .combine) - .accessibilityHint(String(localized: "Will go to main transactions list.", comment: "VoiceOver")) + .accessibilityHint(String(localized: "Will go to main transactions list.", comment: "a11y")) // .accessibilityLabel(balanceTitleStr + SPACE + amountStr) // TODO: CurrencyFormatter! } } diff --git a/TalerWallet1/Views/Balances/BalancesPendingRowV.swift b/TalerWallet1/Views/Balances/BalancesPendingRowV.swift @@ -27,8 +27,8 @@ struct BalancesPendingRowV: View { let needsKYCout = balance.flags.contains(.outgoingKyc) let shouldConfirm = balance.flags.contains(.incomingConfirmation) let needsKYC = needsKYCin || needsKYCout - let needsKYCStr = String(localized: ". Needs K Y C", comment: "VoiceOver") - let needsConfStr = String(localized: ". Needs bank confirmation", comment: "VoiceOver") + let needsKYCStr = String(localized: ". Needs K Y C", comment: "a11y") + let needsConfStr = String(localized: ". Needs bank confirmation", comment: "a11y") VStack(spacing: 6) { if hasIncoming { @@ -56,7 +56,7 @@ struct BalancesPendingRowV: View { needsKYC ? needsKYCStr : shouldConfirm ? needsConfStr : EMPTYSTRING) - .accessibilityHint(String(localized: "Will go to Pending transactions.", comment: "VoiceOver")) + .accessibilityHint(String(localized: "Will go to Pending transactions.", comment: "a11y")) } var body: some View { diff --git a/TalerWallet1/Views/HelperViews/AmountInputV.swift b/TalerWallet1/Views/HelperViews/AmountInputV.swift @@ -102,7 +102,7 @@ struct AmountInputV: View { shouldShowFee: true, // TODO: set to false if we never charge withdrawal fees feeIsNegative: feeIsNegative) let flags = checkAvailable(coinData) - let hint = String(localized: "enabled when amount is non-zero", comment: "VoiceOver") + let hint = String(localized: "enabled when amount is non-zero", comment: "a11y") Button("Next") { buttonAction() } .buttonStyle(TalerButtonStyle(type: .prominent, disabled: flags.disabled)) .disabled(flags.disabled) diff --git a/TalerWallet1/Views/HelperViews/Buttons.swift b/TalerWallet1/Views/HelperViews/Buttons.swift @@ -28,7 +28,7 @@ struct HamburgerButton : View { // Image(systemName: "sidebar.squares.leading") } .talerFont(.title) - .accessibilityLabel("Main Menu") + .accessibilityLabel(Text("Main Menu", comment: "a11y")) } } @@ -74,12 +74,12 @@ struct QRButton : View { UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!) } } - let closingAnnouncement = String(localized: "Closing Camera", comment: "VoiceOver") + let closingAnnouncement = String(localized: "Closing Camera", comment: "a11y") - var defaultPriorityAnnouncement = String(localized: "Opening Camera", comment: "VoiceOver") + var defaultPriorityAnnouncement = String(localized: "Opening Camera", comment: "a11y") var highPriorityAnnouncement: AttributedString { - var highPriorityString = AttributedString(localized: "Camera Active", comment: "VoiceOver") + var highPriorityString = AttributedString(localized: "Camera Active", comment: "a11y") if #available(iOS 17.0, *) { highPriorityString.accessibilitySpeechAnnouncementPriority = .high } @@ -96,7 +96,7 @@ struct QRButton : View { if #available(iOS 17.0, *) { AccessibilityNotification.Announcement(highPriorityAnnouncement).post() } else { - let cameraActive = String(localized: "Camera Active", comment: "VoiceOver") + let cameraActive = String(localized: "Camera Active", comment: "a11y") announce(cameraActive) } } else { @@ -162,7 +162,7 @@ struct BackButton : View { Image(ICONNAME_INCOMING + ICONNAME_FILL) } .talerFont(.largeTitle) - .accessibilityLabel("Back") + .accessibilityLabel(Text("Back", comment: "a11y")) } } @@ -182,7 +182,7 @@ struct ForwardButton : View { Image(imageName) } .talerFont(.largeTitle) - .accessibilityLabel("Continue") + .accessibilityLabel(Text("Continue", comment: "a11y")) } } @@ -194,7 +194,7 @@ struct ArrowUpButton : View { Image(systemName: "arrow.up.to.line") } .talerFont(.title2) - .accessibilityLabel("Scroll up") + .accessibilityLabel(Text("Scroll up", comment: "a11y")) } } @@ -206,7 +206,7 @@ struct ArrowDownButton : View { Image(systemName: "arrow.down.to.line") } .talerFont(.title2) - .accessibilityLabel("Scroll down") + .accessibilityLabel(Text("Scroll down", comment: "a11y")) } } @@ -219,7 +219,7 @@ struct ReloadButton : View { Image(systemName: "arrow.clockwise") } .talerFont(.title) - .accessibilityLabel("Reload") + .accessibilityLabel(Text("Reload", comment: "a11y")) .disabled(disabled) } } diff --git a/TalerWallet1/Views/HelperViews/CurrencyInputView.swift b/TalerWallet1/Views/HelperViews/CurrencyInputView.swift @@ -42,7 +42,7 @@ struct ShortcutButton: View { #endif let shortie = Amount(currency: currency, cent: UInt64(shortcut)) // TODO: adapt for ¥ let title = shortie.formatted(scope, isNegative: false) - let shortcutLabel = String(localized: "Shortcut", comment: "VoiceOver: $50,$25,$10,$5 shortcut buttons") + let shortcutLabel = String(localized: "Shortcut", comment: "a11y: $50,$25,$10,$5 shortcut buttons") let a11yLabel = "\(shortcutLabel) \(title.1)" Button(action: { action(shortcut, currencyField)} ) { Text(title.0) diff --git a/TalerWallet1/Views/HelperViews/LaunchAnimationView.swift b/TalerWallet1/Views/HelperViews/LaunchAnimationView.swift @@ -15,7 +15,7 @@ struct LaunchAnimationView: View { RotatingTaler(size: (350 < UIScreen.screenWidth) ? 200 : 250, progress: true, rotationEnabled: $rotationEnabled) - .accessibilityLabel("Progress indicator") + .accessibilityLabel(Text("Progress indicator", comment: "a11y")) } } } @@ -42,8 +42,8 @@ struct RotatingTaler: View { .scaledToFit() .frame(width: size, height: size) .rotationEffect(rotationDirection ? Angle(degrees: 0) : Angle(degrees: 900)) - .accessibilityLabel(progress ? Text("In progress", comment: "VoiceOver") - : Text("Taler Logo", comment: "VoiceOver")) // decorative logo - with button function + .accessibilityLabel(progress ? Text("In progress", comment: "a11y") + : Text("Taler Logo", comment: "a11y")) // decorative logo - with button function .onReceive(animationTimer) { timerValue in if rotationEnabled { withAnimation(.easeInOut(duration: 1.9)) { diff --git a/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift b/TalerWallet1/Views/HelperViews/QRCodeDetailView.swift @@ -72,7 +72,7 @@ struct QRCodeDetailView: View { .frame(maxWidth: .infinity, alignment: .center) // } } - .accessibilityLabel("QR Code") + .accessibilityLabel(Text("QR Code", comment: "a11y")) .listRowSeparator(.hidden) let amountStr = amountStr(currencyInfo) let scanLong = incoming ? (requesting(amountStr.0), requesting(amountStr.1)) diff --git a/TalerWallet1/Views/HelperViews/ScopePicker.swift b/TalerWallet1/Views/HelperViews/ScopePicker.swift @@ -47,7 +47,7 @@ struct ScopePicker: View { useISO: true, a11yDecSep: ".") let url = balance.scopeInfo.url?.trimURL ?? EMPTYSTRING // let a11yLabel = url + ", " + availableA11y - let choose = String(localized: "Choose the payment service:", comment: "VoiceOver") + let chooseHint = String(localized: "Choose the payment service:", comment: "a11y") let disabled = (count == 1) HStack(alignment: .firstTextBaseline) { @@ -81,7 +81,7 @@ struct ScopePicker: View { } .talerFont(.picker) // .accessibilityLabel(a11yLabel) - .accessibilityHint(disabled ? EMPTYSTRING : choose) + .accessibilityHint(disabled ? EMPTYSTRING : chooseHint) .task() { withAnimation { selected = value } } @@ -118,7 +118,7 @@ struct ScopeDropDown: View { let formatted = formattedAmount(balance, currencyInfo) let amount = Text(formatted.0.nbs) if first { - let a11yLabel = String(localized: "via \(urlOrCurrency)", comment: "VoiceOver") + let a11yLabel = String(localized: "via \(urlOrCurrency)", comment: "a11y") text .accessibilityLabel(a11yLabel) } else { diff --git a/TalerWallet1/Views/HelperViews/SelectDays.swift b/TalerWallet1/Views/HelperViews/SelectDays.swift @@ -41,7 +41,7 @@ struct SelectDays: View { var body: some View { Section { // (alignment: .leading) Text("Expires in:") - .accessibilityLabel("Choose the expiration duration") + .accessibilityLabel(Text("Choose the expiration duration", comment: "a11y")) .accessibilityAddTraits(.isHeader) .accessibilityRemoveTraits(.isStaticText) .talerFont(.title3) diff --git a/TalerWallet1/Views/Main/ErrorView.swift b/TalerWallet1/Views/Main/ErrorView.swift @@ -91,7 +91,7 @@ struct ErrorView: View { } CopyButton(textToCopy: message, vertical: false) - .accessibilityLabel("Copy the error JSON") + .accessibilityLabel(Text("Copy the error JSON", comment: "a11y")) .padding() } else { Text(message) diff --git a/TalerWallet1/Views/Settings/Bank/BankListView.swift b/TalerWallet1/Views/Settings/Bank/BankListView.swift @@ -49,7 +49,7 @@ struct BankListView: View { let _ = Self._printChanges() let _ = symLog.vlog() // just to get the # to compare it with .onAppear & onDisappear #endif - let a11yLabelStr = String(localized: "Add bank account", comment: "VoiceOver for the + button") + let a11yLabelStr = String(localized: "Add bank account", comment: "a11y for the + button") let plusButton = PlusButton(accessibilityLabelStr: a11yLabelStr) { showAddDialog = true } diff --git a/TalerWallet1/Views/Settings/Bank/BankSectionView.swift b/TalerWallet1/Views/Settings/Bank/BankSectionView.swift @@ -71,8 +71,8 @@ struct BankSectionView: View { let methodStr = (paytoType == .iban) ? iban : (paytoType == .xTalerBank) ? xTaler : "unknown payment method" - let editHint = String(localized: "Double tap to edit the account", comment: "VoiceOver") - let selectHint = String(localized: "Double tap to select", comment: "VoiceOver") + let editHint = String(localized: "Double tap to edit the account", comment: "a11y") + let selectHint = String(localized: "Double tap to select", comment: "a11y") Section { NavigationLink { if goToEdit { diff --git a/TalerWallet1/Views/Settings/Exchange/ExchangeListView.swift b/TalerWallet1/Views/Settings/Exchange/ExchangeListView.swift @@ -34,7 +34,7 @@ struct ExchangeListView: View { } var body: some View { - let a11yLabelStr = String(localized: "Add payment service", comment: "VoiceOver for the + button") + let a11yLabelStr = String(localized: "Add payment service", comment: "a11y for the + button") let plusButton = PlusButton(accessibilityLabelStr: a11yLabelStr) { showAlert = true } diff --git a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pPayURIView.swift @@ -65,7 +65,7 @@ struct P2pPayURIView: View { let expiration = peerPullDebitResponse.contractTerms.purse_expiration let (dateString, date) = TalerDater.dateString(expiration, minimalistic) let a11yDate = TalerDater.accessibilityDate(date) ?? dateString - let a11yLabel = String(localized: "Expires: \(a11yDate)", comment: "VoiceOver") + let a11yLabel = String(localized: "Expires: \(a11yDate)", comment: "a11y") Text("Expires: \(dateString)") .talerFont(.body) .accessibilityLabel(a11yLabel) diff --git a/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift b/TalerWallet1/Views/Sheets/P2P_Sheets/P2pReceiveURIView.swift @@ -83,7 +83,7 @@ struct P2pReceiveURIView: View { let expiration = peerPushCreditResponse.contractTerms.purse_expiration let (dateString, date) = TalerDater.dateString(expiration, minimalistic) let a11yDate = TalerDater.accessibilityDate(date) ?? dateString - let a11yLabel = String(localized: "Expires: \(a11yDate)", comment: "VoiceOver") + let a11yLabel = String(localized: "Expires: \(a11yDate)", comment: "a11y") Text("Expires: \(dateString)") .talerFont(.body) .accessibilityLabel(a11yLabel) diff --git a/TalerWallet1/Views/Sheets/Payment/PaymentView.swift b/TalerWallet1/Views/Sheets/Payment/PaymentView.swift @@ -173,7 +173,7 @@ struct PaymentView: View, Sendable { let buttonTitle = terms.fulfillmentMessage ?? String(localized: "Open merchant website") Link(buttonTitle, destination: destination) .buttonStyle(TalerButtonStyle(type: .bordered)) - .accessibilityHint(String(localized: "Will go to the merchant website.", comment: "VoiceOver")) + .accessibilityHint(String(localized: "Will go to the merchant website.", comment: "a11y")) } } } @@ -269,7 +269,7 @@ struct PaymentView: View, Sendable { NavigationLink(destination: destination) { let formatted = effective.formatted(currencyInfo, isNegative: false) Text("Pay \(formatted.0) now") - .accessibilityLabel("Pay \(formatted.1) now") + .accessibilityLabel(Text("Pay \(formatted.1) now", comment: "a11y")) } .buttonStyle(TalerButtonStyle(type: .prominent)) .padding(.horizontal) diff --git a/TalerWallet1/Views/Sheets/QRSheet.swift b/TalerWallet1/Views/Sheets/QRSheet.swift @@ -37,7 +37,7 @@ struct QRSheet: View { let _ = symLog.vlog(scannedCode) // just to get the # to compare it with .onAppear & onDisappear #endif Group { - let errorAnnouncement = String(localized: "Error while scanning QR code", comment: "VoiceOver") + let errorAnnouncement = String(localized: "Error while scanning QR code", comment: "a11y") if scannedCode != nil { if let scannedURL = codeToURL(scannedCode!) { let scheme = scannedURL.scheme @@ -68,7 +68,7 @@ struct QRSheet: View { symLog.log("Found code: \(result.string)") scannedCode = result.string urlToOpen = codeToURL(result.string) - closingAnnouncement = String(localized: "QR code recognized", comment: "VoiceOver") + closingAnnouncement = String(localized: "QR code recognized", comment: "a11y") case .failure(let error): // TODO: errorAlert model.setError(error) diff --git a/TalerWallet1/Views/Sheets/Sheet.swift b/TalerWallet1/Views/Sheets/Sheet.swift @@ -52,7 +52,7 @@ struct Sheet: View { .monospacedDigit() .edgesIgnoringSafeArea(.top) .id("sheetID") - .accessibilityLabel(Text("Sheet.ID.", comment: "VoiceOver")) + .accessibilityLabel(Text("Sheet.ID.", comment: "a11y")) .accessibilityValue(idString) } if let error2 = model.error2 { diff --git a/TalerWallet1/Views/Transactions/ManualDetailsV.swift b/TalerWallet1/Views/Transactions/ManualDetailsV.swift @@ -230,7 +230,7 @@ struct ManualDetailsV: View { .multilineTextAlignment(.leading) .padding(.top) .listRowSeparator(.hidden) - let title = String(localized: "Share the PayTo URL", comment: "VoiceOver") + let title = String(localized: "Share the PayTo URL", comment: "a11y") let minTitle = String(localized: "Share PayTo", comment: "mini") let textToShare = String("\(payto)\n\nIBAN: \(iban)\nReceiver: \(receiverStr)\nAmount: \(amountStr.1)\nSubject: \(details.reservePub)") let _ = print(textToShare) diff --git a/TalerWallet1/Views/Transactions/ManualDetailsWireV.swift b/TalerWallet1/Views/Transactions/ManualDetailsWireV.swift @@ -81,10 +81,10 @@ struct ManualDetailsWireV: View { let cryptocode = HStack { Text(details.reservePub) .monospacedDigit() - .accessibilityLabel(Text("Cryptocode", comment: "VoiceOver")) + .accessibilityLabel(Text("Cryptocode", comment: "a11y")) .frame(maxWidth: .infinity, alignment: .leading) CopyButton(textToCopy: details.reservePub, vertical: true) - .accessibilityLabel(Text("Copy the cryptocode", comment: "VoiceOver")) + .accessibilityLabel(Text("Copy the cryptocode", comment: "a11y")) .disabled(false) } .padding(.leading) let payeeCode = HStack { @@ -96,9 +96,9 @@ struct ManualDetailsWireV: View { .padding(.leading) } .frame(maxWidth: .infinity, alignment: .leading) .accessibilityElement(children: .combine) - .accessibilityLabel(Text("Recipient", comment: "VoiceOver")) + .accessibilityLabel(Text("Recipient", comment: "a11y")) CopyButton(textToCopy: receiverStr, vertical: true) - .accessibilityLabel(Text("Copy the recipient", comment: "VoiceOver")) + .accessibilityLabel(Text("Copy the recipient", comment: "a11y")) .disabled(false) } .padding(.top, -8) let ibanCode = HStack { @@ -110,9 +110,9 @@ struct ManualDetailsWireV: View { .padding(.leading) } .frame(maxWidth: .infinity, alignment: .leading) .accessibilityElement(children: .combine) - .accessibilityLabel(Text("IBAN of the recipient", comment: "VoiceOver")) + .accessibilityLabel(Text("IBAN of the recipient", comment: "a11y")) CopyButton(textToCopy: iban ?? EMPTYSTRING, vertical: true) - .accessibilityLabel(Text("Copy the IBAN", comment: "VoiceOver")) + .accessibilityLabel(Text("Copy the IBAN", comment: "a11y")) .disabled(false) } .padding(.top, -8) let amountCode = HStack { @@ -125,9 +125,9 @@ struct ManualDetailsWireV: View { .padding(.leading) } .frame(maxWidth: .infinity, alignment: .leading) .accessibilityElement(children: .combine) - .accessibilityLabel(Text("Amount to transfer", comment: "VoiceOver")) + .accessibilityLabel(Text("Amount to transfer", comment: "a11y")) CopyButton(textToCopy: amountValue, vertical: true) // only digits + separator, no currency name or symbol - .accessibilityLabel(Text("Copy the amount", comment: "VoiceOver")) + .accessibilityLabel(Text("Copy the amount", comment: "a11y")) .disabled(false) }// .padding(.top, -8) let xTalerCode = HStack { @@ -139,9 +139,9 @@ struct ManualDetailsWireV: View { .padding(.leading) } .frame(maxWidth: .infinity, alignment: .leading) .accessibilityElement(children: .combine) - .accessibilityLabel(Text("account of the recipient", comment: "VoiceOver")) + .accessibilityLabel(Text("account of the recipient", comment: "a11y")) CopyButton(textToCopy: xTaler, vertical: true) - .accessibilityLabel(Text("Copy the account", comment: "VoiceOver")) + .accessibilityLabel(Text("Copy the account", comment: "a11y")) .disabled(false) } .padding(.top, -8) let step1 = Text(minimalistic ? "**Step 1:** Copy+Paste this subject:" diff --git a/TalerWallet1/Views/Transactions/QRcodesForPayto.swift b/TalerWallet1/Views/Transactions/QRcodesForPayto.swift @@ -26,7 +26,7 @@ struct QRcodesForPayto: View { Text(spec.type) QRGeneratorView(text: spec.qrContent) .frame(maxWidth: .infinity, alignment: .center) - .accessibilityLabel("QR Code") + .accessibilityLabel(Text("QR Code", comment: "a11y")) .listRowSeparator(.hidden) HStack { Text(verbatim: "|") // only reason for this leading-aligned text is to get a nice full length listRowSeparator diff --git a/TalerWallet1/Views/Transactions/TransactionPayDetailV.swift b/TalerWallet1/Views/Transactions/TransactionPayDetailV.swift @@ -37,7 +37,7 @@ struct TransactionPayDetailV: View { let buttonTitle = info.fulfillmentMessage ?? String(localized: "Open merchant website") Link(buttonTitle, destination: destination) .buttonStyle(TalerButtonStyle(type: .bordered)) - .accessibilityHint(String(localized: "Will go to the merchant website.", comment: "VoiceOver")) + .accessibilityHint(String(localized: "Will go to the merchant website.", comment: "a11y")) } } else if let fulfillmentMessage = info.fulfillmentMessage { Text(fulfillmentMessage) diff --git a/TalerWallet1/Views/Transactions/TransactionRowView.swift b/TalerWallet1/Views/Transactions/TransactionRowView.swift @@ -88,7 +88,7 @@ struct TransactionRowView: View { // .fontWeight(.medium) iOS 16 .padding(.bottom, -2.0) .accessibilityLabel(doneOrPending ? topA11y! - : topA11y! + String(localized: ", canceled", comment: "VoiceOver")) + : topA11y! + String(localized: ", canceled", comment: "a11y")) let centerBottom = TimelineView(.everyMinute) { context in let (dateString, date) = TalerDater.dateString(common.timestamp, minimalistic, relative: true) Text(dateString) @@ -200,10 +200,10 @@ struct TransactionRowView: View { } .accessibilityElement(children: .combine) .accessibilityValue(!doneOrPending ? EMPTYSTRING - : needsKYC ? String(localized: ". Needs K Y C") - : shouldConfirm ? String(localized: ". Needs bank authorization") + : needsKYC ? String(localized: ". Needs K Y C", comment: "a11y") + : shouldConfirm ? String(localized: ". Needs bank authorization", comment: "a11y") : EMPTYSTRING) - .accessibilityHint(String(localized: "Will go to detail view.", comment: "VoiceOver")) + .accessibilityHint(String(localized: "Will go to detail view.", comment: "a11y")) } } // MARK: - diff --git a/TalerWallet1/Views/Transactions/TransactionSummaryV.swift b/TalerWallet1/Views/Transactions/TransactionSummaryV.swift @@ -277,7 +277,7 @@ struct TransactionSummaryV: View { LinkButton(destination: destination, hintTitle: String(localized: "You need to pass a KYC procedure."), buttonTitle: String(localized: "Open KYC website"), - a11yHint: String(localized: "Will go to KYC website to permit this withdrawal.", comment: "VoiceOver"), + a11yHint: String(localized: "Will go to KYC website to permit this withdrawal.", comment: "a11y"), badge: NEEDS_KYC) } } } let withdrawalDetails = details.withdrawalDetails @@ -294,7 +294,7 @@ struct TransactionSummaryV: View { LinkButton(destination: destination, hintTitle: String(localized: "The bank is waiting for your authorization."), buttonTitle: String(localized: "Authorize now"), - a11yHint: String(localized: "Will go to bank website to authorize this withdrawal.", comment: "VoiceOver"), + a11yHint: String(localized: "Will go to bank website to authorize this withdrawal.", comment: "a11y"), badge: CONFIRM_BANK) } } } } @unknown default: @@ -461,7 +461,7 @@ struct TransactionSummaryV: View { let stackStr = error.stack ?? EMPTYSTRING let errorStr = error.hint + "\n" + stackStr CopyButton(textToCopy: errorStr, vertical: true) - .accessibilityLabel(Text("Copy the error", comment: "VoiceOver")) + .accessibilityLabel(Text("Copy the error", comment: "a11y")) .disabled(false) } } @@ -474,7 +474,7 @@ struct TransactionSummaryV: View { let expiration = details.info.expiration let (dateString, date) = TalerDater.dateString(expiration, minimalistic) let a11yDate = TalerDater.accessibilityDate(date) ?? dateString - let a11yLabel = String(localized: "Expires: \(a11yDate)", comment: "VoiceOver") + let a11yLabel = String(localized: "Expires: \(a11yDate)", comment: "a11y") Text("Expires: \(dateString)") .talerFont(.body) .accessibilityLabel(a11yLabel) diff --git a/TalerWallet1/Views/Transactions/TransactionsListView.swift b/TalerWallet1/Views/Transactions/TransactionsListView.swift @@ -78,7 +78,7 @@ struct TransactionsListView: View { // .navigationTitle("EURO") // Fake EUR instead of the real Currency // .navigationTitle("CHF") // Fake CHF instead of the real Currency .navigationTitle(navTitle ?? scope.currency) - .accessibilityHint(String(localized: "Transaction list", comment: "VoiceOver")) + .accessibilityHint(String(localized: "Transaction list", comment: "a11y")) .task { symLog.log("❗️.task List❗️") await reloadAllAction(stack.push())