mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:42:02 +08:00
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}}
|
{{#if this.passwordRequired}}
|
||||||
<PasswordField
|
<PasswordField
|
||||||
@value={{this.accountPassword}}
|
@value={{this.accountPassword}}
|
||||||
@type={{if this.maskPassword "password" "text"}}
|
|
||||||
@autocomplete="current-password"
|
|
||||||
@capsLockOn={{this.capsLockOn}}
|
@capsLockOn={{this.capsLockOn}}
|
||||||
|
type={{if this.maskPassword "password" "text"}}
|
||||||
|
autocomplete="current-password"
|
||||||
aria-describedby="password-validation password-validation-more-info"
|
aria-describedby="password-validation password-validation-more-info"
|
||||||
aria-invalid={{this.passwordValidation.failed}}
|
aria-invalid={{this.passwordValidation.failed}}
|
||||||
id="new-account-password"
|
id="new-account-password"
|
||||||
|
|
|
@ -32,16 +32,16 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<PasswordField
|
<PasswordField
|
||||||
|
{{on "keydown" this.loginOnEnter}}
|
||||||
@value={{@loginPassword}}
|
@value={{@loginPassword}}
|
||||||
@type={{if this.maskPassword "password" "text"}}
|
@capsLockOn={{this.capsLockOn}}
|
||||||
class={{value-entered @loginPassword}}
|
type={{if this.maskPassword "password" "text"}}
|
||||||
id="login-account-password"
|
disabled={{this.disableLoginFields}}
|
||||||
autocomplete="current-password"
|
autocomplete="current-password"
|
||||||
maxlength="200"
|
maxlength="200"
|
||||||
@capsLockOn={{this.capsLockOn}}
|
|
||||||
disabled={{this.disableLoginFields}}
|
|
||||||
tabindex="1"
|
tabindex="1"
|
||||||
{{on "keydown" this.loginOnEnter}}
|
id="login-account-password"
|
||||||
|
class={{value-entered @loginPassword}}
|
||||||
/>
|
/>
|
||||||
<label class="alt-placeholder" for="login-account-password">
|
<label class="alt-placeholder" for="login-account-password">
|
||||||
{{i18n "login.password"}}
|
{{i18n "login.password"}}
|
||||||
|
|
|
@ -137,9 +137,10 @@
|
||||||
<div class="input password-input input-group">
|
<div class="input password-input input-group">
|
||||||
<PasswordField
|
<PasswordField
|
||||||
@value={{this.accountPassword}}
|
@value={{this.accountPassword}}
|
||||||
@type={{if this.maskPassword "password" "text"}}
|
|
||||||
@id="new-account-password"
|
|
||||||
@capsLockOn={{this.capsLockOn}}
|
@capsLockOn={{this.capsLockOn}}
|
||||||
|
type={{if this.maskPassword "password" "text"}}
|
||||||
|
autocomplete="new-password"
|
||||||
|
id="new-account-password"
|
||||||
class={{value-entered this.accountPassword}}
|
class={{value-entered this.accountPassword}}
|
||||||
/>
|
/>
|
||||||
<label class="alt-placeholder" for="new-account-password">
|
<label class="alt-placeholder" for="new-account-password">
|
||||||
|
|
|
@ -64,10 +64,11 @@
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<PasswordField
|
<PasswordField
|
||||||
@value={{this.accountPassword}}
|
@value={{this.accountPassword}}
|
||||||
@type={{if this.maskPassword "password" "text"}}
|
|
||||||
@id="new-account-password"
|
|
||||||
@capsLockOn={{this.capsLockOn}}
|
@capsLockOn={{this.capsLockOn}}
|
||||||
@autofocus="autofocus"
|
type={{if this.maskPassword "password" "text"}}
|
||||||
|
autofocus="autofocus"
|
||||||
|
autocomplete="new-password"
|
||||||
|
id="new-account-password"
|
||||||
/>
|
/>
|
||||||
<TogglePasswordMask
|
<TogglePasswordMask
|
||||||
@maskPassword={{this.maskPassword}}
|
@maskPassword={{this.maskPassword}}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
</StyleguideExample>
|
</StyleguideExample>
|
||||||
|
|
||||||
<StyleguideExample @title="password">
|
<StyleguideExample @title="password">
|
||||||
<PasswordField @type="password" @placeholder="Placeholder" />
|
<PasswordField type="password" placeholder="Placeholder" />
|
||||||
</StyleguideExample>
|
</StyleguideExample>
|
||||||
|
|
||||||
<StyleguideExample @title="textarea">
|
<StyleguideExample @title="textarea">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user