Browse Source

Remove `autofocus`, it's bad for accessibility and mobile usability

See here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-autofocus
JC Brand 5 years ago
parent
commit
224f41ca8a
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/templates/login_panel.html
  2. 1 1
      src/templates/register_panel.html

+ 1 - 1
src/templates/login_panel.html

@@ -10,7 +10,7 @@
             {[ if (o.authentication == o.LOGIN || o.authentication == o.EXTERNAL) { ]}
             {[ if (o.authentication == o.LOGIN || o.authentication == o.EXTERNAL) { ]}
                 <div class="form-group">
                 <div class="form-group">
                     <label for="converse-login-jid">{{{o.__("XMPP Address:")}}}</label>
                     <label for="converse-login-jid">{{{o.__("XMPP Address:")}}}</label>
-                    <input id="converse-login-jid" class="form-control" autofocus required="required" type="text" name="jid" placeholder="{{{o.placeholder_username}}}"/>
+                    <input id="converse-login-jid" class="form-control" required="required" type="text" name="jid" placeholder="{{{o.placeholder_username}}}"/>
                 </div>
                 </div>
                 {[ if (o.authentication !== o.EXTERNAL) { ]}
                 {[ if (o.authentication !== o.EXTERNAL) { ]}
                 <div class="form-group">
                 <div class="form-group">

+ 1 - 1
src/templates/register_panel.html

@@ -10,7 +10,7 @@
                 {{{o.default_domain}}}
                 {{{o.default_domain}}}
             </div>
             </div>
             {[ } else { ]}
             {[ } else { ]}
-                <input class="form-control" autofocus="autofocus" required="required" type="text" name="domain" placeholder="{{{o.domain_placeholder}}}"/>
+                <input class="form-control" required="required" type="text" name="domain" placeholder="{{{o.domain_placeholder}}}"/>
                 <p class="form-text text-muted">{{{o.help_providers}}} <a href="{{{o.href_providers}}}" class="url" target="_blank" rel="noopener">{{{o.help_providers_link}}}</a>.</p>
                 <p class="form-text text-muted">{{{o.help_providers}}} <a href="{{{o.href_providers}}}" class="url" target="_blank" rel="noopener">{{{o.help_providers_link}}}</a>.</p>
             </div>
             </div>
             <fieldset class="buttons">
             <fieldset class="buttons">