mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Set pin a11y improvements
This commit is contained in:
+1
@@ -66,6 +66,7 @@ struct AppLockSetupPINScreen: View {
|
|||||||
.font(.compound.headingMDBold)
|
.font(.compound.headingMDBold)
|
||||||
.multilineTextAlignment(.center)
|
.multilineTextAlignment(.center)
|
||||||
.foregroundColor(.compound.textPrimary)
|
.foregroundColor(.compound.textPrimary)
|
||||||
|
.accessibilityAddTraits(.isHeader)
|
||||||
|
|
||||||
Text(context.viewState.subtitle)
|
Text(context.viewState.subtitle)
|
||||||
.font(.compound.bodyMD)
|
.font(.compound.bodyMD)
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ struct PINTextField: View {
|
|||||||
textField
|
textField
|
||||||
.textFieldStyle(PINTextFieldStyle(pinCode: pinCode, isSecure: isSecure, maxLength: maxLength, size: size))
|
.textFieldStyle(PINTextFieldStyle(pinCode: pinCode, isSecure: isSecure, maxLength: maxLength, size: size))
|
||||||
.keyboardType(.numberPad)
|
.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)
|
.accessibilityIdentifier(A11yIdentifiers.appLockSetupPINScreen.textField)
|
||||||
.onChange(of: pinCode) { _, newValue in
|
.onChange(of: pinCode) { _, newValue in
|
||||||
let sanitized = sanitize(newValue)
|
let sanitized = sanitize(newValue)
|
||||||
|
|||||||
Reference in New Issue
Block a user