From 521c469561b138254785df7830891209556aee0a Mon Sep 17 00:00:00 2001 From: Ahmet Abdullah Gultekin Date: Fri, 12 Jun 2026 12:18:14 +0000 Subject: [PATCH] fix(a11y): add autocomplete=username/current-password to login inputs The sign-in inputs lacked autocomplete attributes, producing a browser DOM warning and degraded password-manager behaviour. - LoginPage email field: autoComplete email -> username (the identifier field on a sign-in form should be username for password managers). - PasswordStep (hosted verify.fivucsas flow via LoginMfaFlow): add autoComplete=username to the email field and current-password to the password field (both were missing entirely). - IdentifierStep (shared opening identity entry, both surfaces): add autoComplete=username. Scope is strictly the login/identifier/password sign-in path; register and reset-password flows are untouched. Typecheck clean; npm run build passes. --- src/features/auth/components/LoginPage.tsx | 2 +- src/features/auth/components/steps/PasswordStep.tsx | 2 ++ src/features/auth/login-shared/steps/IdentifierStep.tsx | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/features/auth/components/LoginPage.tsx b/src/features/auth/components/LoginPage.tsx index 9562d43..01e373b 100644 --- a/src/features/auth/components/LoginPage.tsx +++ b/src/features/auth/components/LoginPage.tsx @@ -1072,7 +1072,7 @@ export default function LoginPage() { margin="normal" autoFocus required - autoComplete="email" + autoComplete="username" inputProps={{ 'aria-required': 'true' }} disabled={loading} InputProps={{ diff --git a/src/features/auth/components/steps/PasswordStep.tsx b/src/features/auth/components/steps/PasswordStep.tsx index 61d5d4f..52a1c28 100644 --- a/src/features/auth/components/steps/PasswordStep.tsx +++ b/src/features/auth/components/steps/PasswordStep.tsx @@ -124,6 +124,7 @@ export default function PasswordStep({ onSubmit, loading, error, presetEmail }: helperText={errors.email?.message} margin="normal" autoFocus + autoComplete="username" disabled={loading} InputProps={{ startAdornment: ( @@ -160,6 +161,7 @@ export default function PasswordStep({ onSubmit, loading, error, presetEmail }: helperText={errors.password?.message} margin="normal" autoFocus={identifierFirst} + autoComplete="current-password" disabled={loading} InputProps={{ startAdornment: ( diff --git a/src/features/auth/login-shared/steps/IdentifierStep.tsx b/src/features/auth/login-shared/steps/IdentifierStep.tsx index e22617d..763f5f9 100644 --- a/src/features/auth/login-shared/steps/IdentifierStep.tsx +++ b/src/features/auth/login-shared/steps/IdentifierStep.tsx @@ -101,6 +101,7 @@ export default function IdentifierStep({ fullWidth type="email" label={t('auth.emailLabel')} + autoComplete="username" value={value} onChange={(e) => onChange(e.target.value)} onKeyDown={(e) => {