From 68d34bd33d7c9ef1244d593bd761d78761edf4f7 Mon Sep 17 00:00:00 2001 From: Vera de Kok Date: Thu, 25 Jun 2026 21:03:28 +0200 Subject: [PATCH 1/3] Fix login form: use label elements instead of th for accessibility --- resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html b/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html index 08c890d381ed..2b3488f84213 100644 --- a/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html +++ b/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html @@ -24,14 +24,14 @@

Sign In to Gerrit Code Review at example.com

- + - +
Username
Password Date: Sun, 30 Aug 2026 10:52:07 +0200 Subject: [PATCH 2/3] Fix login form: mobile-friendly responsive layout Add a viewport meta tag and responsive CSS to the LDAP login form so it renders correctly on mobile devices. The fixed-width table layout is flattened into a single column, the form is shown as a centered card (max-width 400px), and inputs/labels/buttons are styled for touch use. A media query adjusts card padding on narrow (<440px) screens. --- .../gerrit/httpd/auth/ldap/LoginForm.html | 175 ++++++++++++++++++ 1 file changed, 175 insertions(+) diff --git a/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html b/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html index 2b3488f84213..43ad3d5ea906 100644 --- a/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html +++ b/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html @@ -1,5 +1,6 @@ + Gerrit Code Review - Sign In From d6c5360d55f0cdc9f1ba24282cf8b433e316223f Mon Sep 17 00:00:00 2001 From: Vera de Kok Date: Sun, 30 Aug 2026 12:08:40 +0200 Subject: [PATCH 3/3] Minimize responsive login form CSS Replace the 175-line mobile style block with a small media query that stacks the table in a single column and makes inputs full width (plus 16px font size to avoid iOS auto-zoom). Desktop appearance is unchanged since the new rules are scoped to narrow screens. --- .../gerrit/httpd/auth/ldap/LoginForm.html | 190 ++---------------- 1 file changed, 16 insertions(+), 174 deletions(-) diff --git a/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html b/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html index 43ad3d5ea906..80112a3f05ef 100644 --- a/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html +++ b/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html @@ -13,6 +13,22 @@ #cancel_link { margin-left: 45px; } + /* Stack the form in a single column on small screens so it fits + without horizontal scrolling; inputs fill the row width. */ + @media (max-width: 600px) { + #login_form table, + #login_form table tbody, + #login_form table tr, + #login_form table td { + display: block; + } + #login_form input[type="text"], + #login_form input[type="password"] { + width: 100%; + box-sizing: border-box; + font-size: 16px; /* avoid iOS auto-zoom on focus */ + } + } @@ -96,179 +112,5 @@

Sign In to Gerrit Code Review at example.com

f_user.focus(); ]]> -