commit 689e76e903ab94171f8b1e2a7479e06c703ecfe5
parent 249517c97b965486ca10e2ece25cb537877cc661
Author: Marc Stibane <marc@taler.net>
Date: Mon, 9 Dec 2024 18:27:09 +0100
fix a11y
Diffstat:
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/TalerWallet1/Views/Actions/Banking/DepositAmountView.swift b/TalerWallet1/Views/Actions/Banking/DepositAmountView.swift
@@ -135,9 +135,12 @@ struct DepositAmountView: View {
let disabled = insufficient || amountToTransfer.isZero
- Text("Available:\t\(availableStr)")
+ Text("Available: \(availableStr.0)")
+ .accessibilityLabel("Available: \(availableStr.1)")
.talerFont(.title3)
- .padding(.bottom, 2)
+ .frame(maxWidth: .infinity, alignment: .trailing)
+ .padding(.horizontal)
+// .padding(.bottom, 2)
let a11yLabel = String(localized: "Amount to deposit:", comment: "accessibility, no abbreviations")
let amountLabel = minimalistic ? String(localized: "Amount:")
: a11yLabel
@@ -157,7 +160,8 @@ struct DepositAmountView: View {
: (feeAmount?.isZero ?? true) ? WalletColors().secondary(colorScheme, colorSchemeContrast)
: WalletColors().negative)
.padding(4)
- let hint = String(localized: "enabled when amount is non-zero, but not higher than your available amount", comment: "VoiceOver")
+ let hint = String(localized: "enabled when amount is non-zero, but not higher than your available amount",
+ comment: "VoiceOver")
Button(buttonTitle(amountToTransfer)) { startDeposit() }
.buttonStyle(TalerButtonStyle(type: .prominent, disabled: disabled || depositStarted))
.padding(.horizontal)
diff --git a/TalerWallet1/Views/HelperViews/CurrencyInputView.swift b/TalerWallet1/Views/HelperViews/CurrencyInputView.swift
@@ -155,12 +155,9 @@ struct CurrencyInputView: View {
Text(heading)
.padding(.horizontal, 4)
.padding(.top)
- .frame(maxWidth: .infinity, alignment: .trailing) // title != nil ? .leading :
+ .frame(maxWidth: .infinity, alignment: title != nil ? .leading : .trailing)
.talerFont(.title2)
- .accessibilityAddTraits(.isHeader)
- .if(title == nil && available != nil) { view in
- view.accessibilityLabel(a11yLabel)
- }
+ .accessibilityHidden(true)
.padding(.bottom, -6)
}
currencyField