From e823122f1999f1bed4d92e8055c1431a042727e3 Mon Sep 17 00:00:00 2001 From: MrSmoer Date: Thu, 7 Nov 2024 01:08:40 +0100 Subject: [PATCH] fix: Move "forgot_password"-link to fix login tab order Previously hitting tab in the username field set the focus to the "forgot password" link. Only on the next hit the password field was selected. This is an issue for some password managers (keepassdx android keyboard) and not as nice for accessibility. Now the forgot link is below the sign up link at the bottom of the page. Using "tabindex" didn't work properly with the templating engine because many elements get assigned a tabindex of "0" by default disrupting the tab selection sequence. --- templates/user/auth/signin_inner.tmpl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/templates/user/auth/signin_inner.tmpl b/templates/user/auth/signin_inner.tmpl index d4ba664e37..56532f4b98 100644 --- a/templates/user/auth/signin_inner.tmpl +++ b/templates/user/auth/signin_inner.tmpl @@ -17,9 +17,8 @@ {{if or (not .DisablePassword) .LinkAccountMode}} -
+
- {{ctx.Locale.Tr "auth.forgot_password"}}
{{end}} @@ -52,11 +51,15 @@
{{template "user/auth/webauthn_error" .}} - {{if .ShowRegistrationButton}}
+ {{if .ShowRegistrationButton}}
{{ctx.Locale.Tr "auth.hint_register" (printf "%s/user/sign_up" AppSubUrl)}} +
+
+ {{end}} +
- {{end}}