Skip to content

Tab based Keyboard navigation now navigates to password input first #3215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions client/modules/User/components/LoginForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ function LoginForm() {
{t('LoginForm.Password')}
</label>
<div className="form__field__password">
<input
className="form__input"
aria-label={t('LoginForm.PasswordARIA')}
type={showPassword ? 'text' : 'password'}
id="password"
autoComplete="current-password"
{...field.input}
/>
<button
className="form__eye__icon"
type="button"
Expand All @@ -69,14 +77,6 @@ function LoginForm() {
<AiOutlineEye />
)}
</button>
<input
className="form__input"
aria-label={t('LoginForm.PasswordARIA')}
type={showPassword ? 'text' : 'password'}
id="password"
autoComplete="current-password"
{...field.input}
/>
</div>
{field.meta.touched && field.meta.error && (
<span className="form-error" aria-live="polite">
Expand Down
32 changes: 16 additions & 16 deletions client/modules/User/components/SignupForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ function SignupForm() {
{t('SignupForm.Password')}
</label>
<div className="form__field__password">
<input
className="form__input"
aria-label={t('SignupForm.PasswordARIA')}
type={showPassword ? 'text' : 'password'}
id="password"
autoComplete="new-password"
{...field.input}
/>
<button
className="form__eye__icon"
type="button"
Expand All @@ -125,14 +133,6 @@ function SignupForm() {
<AiOutlineEye />
)}
</button>
<input
className="form__input"
aria-label={t('SignupForm.PasswordARIA')}
type={showPassword ? 'text' : 'password'}
id="password"
autoComplete="new-password"
{...field.input}
/>
</div>
{field.meta.touched && field.meta.error && (
<span className="form-error" aria-live="polite">
Expand All @@ -149,6 +149,14 @@ function SignupForm() {
{t('SignupForm.ConfirmPassword')}
</label>
<div className="form__field__password">
<input
className="form__input"
type={showConfirmPassword ? 'text' : 'password'}
aria-label={t('SignupForm.ConfirmPasswordARIA')}
id="confirmPassword" // Match the id with htmlFor
autoComplete="new-password"
{...field.input}
/>
<button
className="form__eye__icon"
type="button"
Expand All @@ -161,14 +169,6 @@ function SignupForm() {
<AiOutlineEye />
)}
</button>
<input
className="form__input"
type={showConfirmPassword ? 'text' : 'password'}
aria-label={t('SignupForm.ConfirmPasswordARIA')}
id="confirmPassword" // Match the id with htmlFor
autoComplete="new-password"
{...field.input}
/>
</div>
{field.meta.touched && field.meta.error && (
<span className="form-error" aria-live="polite">
Expand Down
Loading