mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Set pin a11y improvements
This commit is contained in:
+1
@@ -66,6 +66,7 @@ struct AppLockSetupPINScreen: View {
|
||||
.font(.compound.headingMDBold)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundColor(.compound.textPrimary)
|
||||
.accessibilityAddTraits(.isHeader)
|
||||
|
||||
Text(context.viewState.subtitle)
|
||||
.font(.compound.bodyMD)
|
||||
|
||||
@@ -20,6 +20,8 @@ struct PINTextField: View {
|
||||
textField
|
||||
.textFieldStyle(PINTextFieldStyle(pinCode: pinCode, isSecure: isSecure, maxLength: maxLength, size: size))
|
||||
.keyboardType(.numberPad)
|
||||
// Keep the label persistent: the field's title behaves as a placeholder and is only announced while empty.
|
||||
.accessibilityLabel(L10n.a11yPinField)
|
||||
.accessibilityIdentifier(A11yIdentifiers.appLockSetupPINScreen.textField)
|
||||
.onChange(of: pinCode) { _, newValue in
|
||||
let sanitized = sanitize(newValue)
|
||||
|
||||
Reference in New Issue
Block a user