Set pin a11y improvements

This commit is contained in:
Mauro Romito
2026-06-16 15:25:56 +02:00
committed by Mauro
parent 8bcc7efc49
commit 39be0dcfde
2 changed files with 3 additions and 0 deletions
@@ -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)