From 9ebfbe4f813b57c8797d4eaed91d09eb6e769c9d Mon Sep 17 00:00:00 2001 From: STEP35 Burn Agent Date: Thu, 30 Apr 2026 01:02:58 -0400 Subject: [PATCH] =?UTF-8?q?fix(a11y):=20V6=20=E2=80=94=20change=20login=20?= =?UTF-8?q?heading=20from=20

=20to=20

?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sign-in page heading was `

` breaking heading hierarchy (WCAG 1.3.1). Override `user/auth/signin_inner.tmpl` with corrected inner template: - Change heading to `

` for proper rank - Fix template structure: remove extraneous base/head/footer includes - Use proper context variable `ctx.Locale` instead of `.locale` - Preserve R1 (password visibility) and R2 (aria-required) improvements Closes #550 --- .../templates/user/auth/signin_inner.tmpl | 165 +++++++++--------- 1 file changed, 81 insertions(+), 84 deletions(-) diff --git a/deploy/gitea-a11y/custom/templates/user/auth/signin_inner.tmpl b/deploy/gitea-a11y/custom/templates/user/auth/signin_inner.tmpl index 8baec224..3e584065 100644 --- a/deploy/gitea-a11y/custom/templates/user/auth/signin_inner.tmpl +++ b/deploy/gitea-a11y/custom/templates/user/auth/signin_inner.tmpl @@ -1,96 +1,93 @@ {{/* - Gitea a11y fix: R1 — Password visibility toggle + R2 — aria-required + Gitea a11y fix: V6 — Heading hierarchy + R1 — Password visibility toggle + R2 — aria-required Override of user/auth/signin_inner.tmpl - Adds: - - Eye icon toggle to show/hide password content - - aria-required="true" on required fields - - Proper label associations + Changes: + - V6: Heading changed from

to

for proper hierarchy (WCAG 1.3.1) + - R2: Add aria-required="true" to required fields (username, password) + - R1: Add eye-icon toggle to show/hide password Deploy to: custom/templates/user/auth/signin_inner.tmpl */}} -{{template "base/head" .}} -
- +
+ {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}} + {{template "base/alert" .}} + {{end}} +

+ {{if .LinkAccountMode}} + {{ctx.Locale.Tr "auth.oauth_signin_title"}} + {{else}} + {{ctx.Locale.Tr "auth.login_userpass"}} + {{end}} +

+
+ {{if .EnablePasswordSignInForm}} +
+ {{.CsrfTokenHtml}} +
+ + +
+ {{if or (not .DisablePassword) .LinkAccountMode}} +
+
+ + {{ctx.Locale.Tr "auth.forgot_password"}} +
+
+ + +
+
+ {{end}} +
+ +
+ {{if not .LinkAccountMode}} + + {{end}} + {{if and (not .DisablePublicRegistry) .LinkAccountMode}} +
+ {{ctx.Locale.Tr "auth.or"}} +
+ + {{end}} +
+ {{end}} +
+{{/* a11y R1: password visibility toggle */}} -{{template "base/footer" .}} + \ No newline at end of file