Skip to content

Commit aa9faf8

Browse files
authored
Set manual tabindexes on login page (#31689)
Fixes #31686. A more elborate manual tabindex numbering could be done, but I think it's not really worth the extra effort and such stuff could easily break during refactors. Includes another small tweak to un-stretch the`<a>` element so it's only as large as it needs to be and this change also made the margin unneeded.
1 parent 3b10fd9 commit aa9faf8

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

templates/user/auth/signin_inner.tmpl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,30 @@
1414
{{.CsrfTokenHtml}}
1515
<div class="required field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
1616
<label for="user_name">{{ctx.Locale.Tr "home.uname_holder"}}</label>
17-
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required>
17+
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required tabindex="1">
1818
</div>
1919
{{if or (not .DisablePassword) .LinkAccountMode}}
2020
<div class="required field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}} form-field-content-aside-label">
2121
<label for="password">{{ctx.Locale.Tr "password"}}</label>
22-
<a href="{{AppSubUrl}}/user/forgot_password">{{ctx.Locale.Tr "auth.forgot_password"}}</a>
23-
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="current-password" required>
22+
<div>
23+
<a href="{{AppSubUrl}}/user/forgot_password" tabindex="4">{{ctx.Locale.Tr "auth.forgot_password"}}</a>
24+
</div>
25+
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="current-password" required tabindex="2">
2426
</div>
2527
{{end}}
2628
{{if not .LinkAccountMode}}
2729
<div class="inline field">
2830
<div class="ui checkbox">
2931
<label>{{ctx.Locale.Tr "auth.remember_me"}}</label>
30-
<input name="remember" type="checkbox">
32+
<input name="remember" type="checkbox" tabindex="5">
3133
</div>
3234
</div>
3335
{{end}}
3436

3537
{{template "user/auth/captcha" .}}
3638

3739
<div class="field">
38-
<button class="ui primary button tw-w-full">
40+
<button class="ui primary button tw-w-full" tabindex="3">
3941
{{if .LinkAccountMode}}
4042
{{ctx.Locale.Tr "auth.oauth_signin_submit"}}
4143
{{else}}

web_src/css/form.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,6 @@ textarea:focus,
456456
}
457457
.form-field-content-aside-label > *:nth-child(2) {
458458
text-align: right;
459-
margin-bottom: 4px;
460459
}
461460
.form-field-content-aside-label input {
462461
grid-column: span 2;

0 commit comments

Comments
 (0)