DEV: Use `autocomplete="new-password"` (#25913)
And normalize `<PasswordField />` arguments
(we were getting `[DOM] Input elements should have autocomplete attributes (suggested: "current-password")` in smoke test logs, this may or may not fix that 😛)
This commit is contained in:
parent
64e8ad170e
commit
f44bee1333
|
@ -137,9 +137,9 @@
|
|||
{{#if this.passwordRequired}}
|
||||
<PasswordField
|
||||
@value={{this.accountPassword}}
|
||||
@type={{if this.maskPassword "password" "text"}}
|
||||
@autocomplete="current-password"
|
||||
@capsLockOn={{this.capsLockOn}}
|
||||
type={{if this.maskPassword "password" "text"}}
|
||||
autocomplete="current-password"
|
||||
aria-describedby="password-validation password-validation-more-info"
|
||||
aria-invalid={{this.passwordValidation.failed}}
|
||||
id="new-account-password"
|
||||
|
|
|
@ -32,16 +32,16 @@
|
|||
</div>
|
||||
<div class="input-group">
|
||||
<PasswordField
|
||||
{{on "keydown" this.loginOnEnter}}
|
||||
@value={{@loginPassword}}
|
||||
@type={{if this.maskPassword "password" "text"}}
|
||||
class={{value-entered @loginPassword}}
|
||||
id="login-account-password"
|
||||
@capsLockOn={{this.capsLockOn}}
|
||||
type={{if this.maskPassword "password" "text"}}
|
||||
disabled={{this.disableLoginFields}}
|
||||
autocomplete="current-password"
|
||||
maxlength="200"
|
||||
@capsLockOn={{this.capsLockOn}}
|
||||
disabled={{this.disableLoginFields}}
|
||||
tabindex="1"
|
||||
{{on "keydown" this.loginOnEnter}}
|
||||
id="login-account-password"
|
||||
class={{value-entered @loginPassword}}
|
||||
/>
|
||||
<label class="alt-placeholder" for="login-account-password">
|
||||
{{i18n "login.password"}}
|
||||
|
|
|
@ -137,9 +137,10 @@
|
|||
<div class="input password-input input-group">
|
||||
<PasswordField
|
||||
@value={{this.accountPassword}}
|
||||
@type={{if this.maskPassword "password" "text"}}
|
||||
@id="new-account-password"
|
||||
@capsLockOn={{this.capsLockOn}}
|
||||
type={{if this.maskPassword "password" "text"}}
|
||||
autocomplete="new-password"
|
||||
id="new-account-password"
|
||||
class={{value-entered this.accountPassword}}
|
||||
/>
|
||||
<label class="alt-placeholder" for="new-account-password">
|
||||
|
|
|
@ -64,10 +64,11 @@
|
|||
<div class="input">
|
||||
<PasswordField
|
||||
@value={{this.accountPassword}}
|
||||
@type={{if this.maskPassword "password" "text"}}
|
||||
@id="new-account-password"
|
||||
@capsLockOn={{this.capsLockOn}}
|
||||
@autofocus="autofocus"
|
||||
type={{if this.maskPassword "password" "text"}}
|
||||
autofocus="autofocus"
|
||||
autocomplete="new-password"
|
||||
id="new-account-password"
|
||||
/>
|
||||
<TogglePasswordMask
|
||||
@maskPassword={{this.maskPassword}}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
</StyleguideExample>
|
||||
|
||||
<StyleguideExample @title="password">
|
||||
<PasswordField @type="password" @placeholder="Placeholder" />
|
||||
<PasswordField type="password" placeholder="Placeholder" />
|
||||
</StyleguideExample>
|
||||
|
||||
<StyleguideExample @title="textarea">
|
||||
|
|
Loading…
Reference in New Issue