Procházet zdrojové kódy

Improved accessibility:

* adding aria-hidden="true" on fields with hidden-username class.
John Livingston před 11 měsíci
rodič
revize
02f6d9da71

+ 2 - 1
src/plugins/muc-views/templates/muc-password-form.js

@@ -11,7 +11,8 @@ export default (o) => {
             <fieldset>
                 <label class="form-label">${i18n_heading}</label>
                 <p class="validation-message">${o.validation_message}</p>
-                <input class="hidden-username" type="text" autocomplete="username" value="${o.jid}"></input>
+                <input class="hidden-username" aria-hidden="true" type="text"
+                    autocomplete="username" value="${o.jid}"></input>
                 <input type="password"
                     name="password"
                     required="required"

+ 2 - 1
src/templates/form_input.js

@@ -8,7 +8,8 @@ export default  (o) => html`
         <!-- This is a hack to prevent Chrome from auto-filling the username in
              any of the other input fields in the MUC configuration form. -->
         ${ (o.type === 'password' && o.fixed_username) ? html`
-            <input class="hidden-username" type="text" autocomplete="username" value="${o.fixed_username}"></input>
+            <input class="hidden-username" aria-hidden="true" type="text"
+                autocomplete="username" value="${o.fixed_username}"></input>
         ` : '' }
         <input
             autocomplete="${o.autocomplete || ''}"