Bug 1584457 - replace <textbox> in AccountWizard.xul. r=mkmelin
authorAlessandro Castellani <alessandro@thunderbird.net>
Fri, 27 Sep 2019 13:29:30 -0700
changeset 36984 be89db948eee0f3efb6e926c18906b3c9e0480a6
parent 36983 6269e3283765d5db1a6bf16df3a7d2bfb3925fa8
child 36985 376a47f13cc2b1bc19bb4f52ec9d1f0fd000e0b6
push id395
push userclokep@gmail.com
push dateMon, 02 Dec 2019 19:38:57 +0000
reviewersmkmelin
bugs1584457
Bug 1584457 - replace <textbox> in AccountWizard.xul. r=mkmelin
mailnews/base/prefs/content/AccountWizard.xul
--- a/mailnews/base/prefs/content/AccountWizard.xul
+++ b/mailnews/base/prefs/content/AccountWizard.xul
@@ -1,33 +1,38 @@
 <?xml version="1.0"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://messenger/skin/accountWizard.css" type="text/css"?>
+<?xml-stylesheet type="text/css" href="chrome://messenger/skin/input-fields.css"?>
 
 <!DOCTYPE wizard [
 <!ENTITY % AccountWizardDTD SYSTEM "chrome://messenger/locale/AccountWizard.dtd">
 %AccountWizardDTD;
 <!ENTITY % newsblogDTD SYSTEM "chrome://messenger-newsblog/locale/am-newsblog.dtd">
 %newsblogDTD;
 ]>
 
 <wizard id="AccountWizard" title="&windowTitle.label;"
 #ifdef MOZ_THUNDERBIRD
         onload="onAccountWizardLoad(); initAccountWizardTB(window.arguments);"
 #else
         onload="onAccountWizardLoad();"
 #endif
         style="&accountWizard.size;"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
+        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+        xmlns:html="http://www.w3.org/1999/xhtml">
 
   <stringbundle id="bundle_prefs" src="chrome://messenger/locale/prefs.properties"/>
   <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
+
+  <script src="chrome://global/content/globalOverlay.js"/>
+  <script src="chrome://global/content/editMenuOverlay.js"/>
   <script src="chrome://messenger/content/accountUtils.js"/>
   <script src="chrome://messenger/content/amUtils.js"/>
   <script src="chrome://messenger/content/AccountWizard.js"/>
   <script src="chrome://messenger/content/aw-accounttype.js"/>
   <script src="chrome://messenger/content/aw-identity.js"/>
   <script src="chrome://messenger/content/aw-incoming.js"/>
   <script src="chrome://messenger/content/aw-outgoing.js"/>
   <script src="chrome://messenger/content/aw-accname.js"/>
@@ -65,45 +70,46 @@
   <!-- Identity page : Collects user's full name and email address -->
   <wizardpage id="identitypage" pageid="identitypage"
               label="&identityTitle.label;">
     <vbox>
       <description flex="1">&identityDesc.label;</description>
       <separator/>
       <description flex="1">&fullnameDesc.label; &fullnameExample.label;</description>
       <separator class="thin"/>
-      <hbox align="center">
-        <label class="awIdentityLabel" value="&fullnameLabel.label;"
+      <hbox align="center" class="input-container">
+        <label id="fullnameLabel" class="awIdentityLabel" value="&fullnameLabel.label;"
                accesskey="&fullnameLabel.accesskey;" control="fullName"/>
-        <textbox id="fullName"
-                 mailtype="identity"
-                 wsm_persist="true"
-                 name="fullName"
-                 flex="1"
-                 oninput="identityPageValidate();"/>
+        <html:input id="fullName"
+                    type="text"
+                    wsm_persist="true"
+                    name="fullName"
+                    class="input-inline"
+                    aria-labelledby="fullnameLabel"
+                    oninput="identityPageValidate();"/>
       </hbox>
       <separator/>
       <vbox>
         <hbox>
           <description id="emailDescText" flex="1"/>
         </hbox>
         <hbox align="center">
           <label id="emailFieldLabel"
                  class="awIdentityLabel"
                  value="&emailLabel.label;"
                  accesskey="&emailLabel.accesskey;"
                  control="email"/>
-          <hbox class="uri-element" align="center" flex="1">
-            <textbox id="email"
-                     wsm_persist="true"
-                     mailtype="identity"
-                     name="email"
-                     flex="1"
-                     oninput="identityPageValidate();"
-                     class="uri-element"/>
+          <hbox class="uri-element input-container" align="center" flex="1">
+            <html:input id="email"
+                        type="email"
+                        wsm_persist="true"
+                        name="email"
+                        aria-labelledby="emailFieldLabel"
+                        oninput="identityPageValidate();"
+                        class="uri-element input-inline"/>
             <label id="postEmailText"/>
           </hbox>
         </hbox>
       </vbox>
     </vbox>
   </wizardpage>
 
   <!-- Incoming page : User can choose to create mail account of his choice, POP3 or IMAP -->
@@ -131,49 +137,52 @@
             <label id="defaultPortLabel" value="&defaultPortLabel.label;"/>
             <label id="defaultPortValue" value="&defaultPortValue.label;"/>
           </hbox>
           <separator/>
         </vbox>
 
         <vbox id="incomingServerbox">
           <description>&incomingServer.description;</description>
-          <hbox align="center" class="serverDataBox">
-            <label class="label, serverLabel"
+          <hbox align="center" class="serverDataBox input-container">
+            <label id="incomingServerLabel" class="label serverLabel"
                    value="&incomingServer.label;"
                    accesskey="&incomingServer.accesskey;"
                    control="incomingServer"/>
-            <textbox id="incomingServer"
-                     wsm_persist="true"
-                     flex="1"
-                     class="uri-element"
-                     oninput="incomingPageValidate();"/>
+            <html:input id="incomingServer"
+                        type="text"
+                        wsm_persist="true"
+                        class="uri-element input-inline"
+                        aria-labelledby="incomingServerLabel"
+                        oninput="incomingPageValidate();"/>
           </hbox>
           <hbox id="leaveMsgsOnSrvrBox" class="indent">
             <checkbox id="leaveMessagesOnServer"
                       label="&leaveMsgsOnSrvr.label;"
                       accesskey="&leaveMsgsOnSrvr.accesskey;"
                       wsm_persist="true"
                       oncommand="setServerPrefs(this);"
                       checked="true"/>
           </hbox>
           <separator/>
         </vbox>
         <description>&incomingUsername.description;</description>
         <separator class="thin"/>
-        <hbox align="center">
-          <label class="label"
+        <hbox align="center" class="input-container">
+          <label id="usernameLabel" class="label"
                  value="&incomingUsername.label;"
                  style="width: 8em;"
                  accesskey="&incomingUsername.accesskey;"
                  control="username"/>
-          <textbox id="username"
-                   wsm_persist="true"
-                   flex="1"
-                   oninput="incomingPageValidate();"/>
+          <html:input id="username"
+                      type="text"
+                      class="input-inline"
+                      wsm_persist="true"
+                      aria-labelledby="usernameLabel"
+                      oninput="incomingPageValidate();"/>
         </hbox>
         <vbox id="deferStorageBox">
             <separator class="groove"/>
             <description> &deferStorageDesc.label;</description>
             <hbox>
               <checkbox id="deferStorage"
                         label="&deferStorage.label;"
                         accesskey="&deferStorage.accesskey;"
@@ -189,46 +198,51 @@
   <!-- Outgoing server name is collected if there isn't one already -->
   <!-- Login name is prefilled with user id from the email address provided in identity page -->
   <!-- User can enter a login name here if it is different from the user id of his/her email address -->
   <wizardpage id="outgoingpage" pageid="outgoingpage"
               label="&outgoingTitle.label;">
     <vbox flex="1">
       <vbox id="noSmtp">
         <description>&outgoingServer.description;</description>
-        <hbox align="center" class="serverDataBox">
-          <label class="label, serverLabel"
+        <hbox align="center" class="serverDataBox input-container">
+          <label id="smtphostnameLabel" class="label serverLabel"
                  value="&outgoingServer.label;"
                  accesskey="&outgoingServer.accesskey;"
                  control="smtphostname"/>
-          <textbox id="smtphostname"
-                   wsm_persist="true"
-                   flex="1"
-                   class="uri-element"
-                   oninput="outgoingPageValidate();"/>
+          <html:input id="smtphostname"
+                      type="text"
+                      wsm_persist="true"
+                      class="uri-element input-inline"
+                      aria-labelledby="smtphostnameLabel"
+                      oninput="outgoingPageValidate();"/>
         </hbox>
       </vbox>
 
       <vbox id="haveSmtp">
         <description id="smtpStaticText1"
                      style="width: 200px;"
                      prefix="&haveSmtp1.prefix;"
                      suffix="&haveSmtp1.suffix3; &modifyOutgoing.suffix;">*</description>
       </vbox>
 
       <vbox id="loginSet1">
         <description>&outgoingUsername.description;</description>
         <separator class="thin"/>
-        <hbox align="center">
-          <label class="label"
+        <hbox align="center" class="input-container">
+          <label id="smtpusernameLabel" class="label"
                  value="&outgoingUsername.label;"
                  style="width: 8em;"
                  accesskey="&outgoingUsername.accesskey;"
                  control="smtpusername"/>
-          <textbox id="smtpusername" wsm_persist="true" flex="1"/>
+          <html:input id="smtpusername"
+                      type="text"
+                      class="input-inline"
+                      aria-labelledby="smtpusernameLabel"
+                      wsm_persist="true"/>
         </hbox>
       </vbox>
 
       <vbox id="loginSet2" hidden="true">
         <description id="smtpStaticText2" style="width: 200px;" prefix="&haveSmtp2.prefix;"
                      suffix="&haveSmtp2.suffix3; &modifyOutgoing.suffix;">*</description>
       </vbox>
 
@@ -241,38 +255,51 @@
   </wizardpage>
 
   <!-- News Server page : Collects the News groups server name -->
   <wizardpage id="newsserver" pageid="newsserver"
               label="&incomingTitle.label;">
     <vbox flex="1">
       <description>&newsServerNameDesc.label;</description>
       <separator class="thin"/>
-      <hbox align="center">
-        <label control="newsServer" value="&newsServerLabel.label;" accesskey="&newsServerLabel.accesskey;" style="width: 8em;"/>
-        <textbox id="newsServer"
-                 wsm_persist="true"
-                 flex="1"
-                 class="uri-element"
-                 oninput="incomingPageValidate();"/>
+      <hbox align="center" class="input-container">
+        <label id="newsServerLabel" control="newsServer"
+               value="&newsServerLabel.label;"
+               accesskey="&newsServerLabel.accesskey;"
+               style="width: 8em;"/>
+        <html:input id="newsServer"
+                    type="text"
+                    wsm_persist="true"
+                    class="uri-element input-inline"
+                    aria-labelledby="newsServerLabel"
+                    oninput="incomingPageValidate();"/>
       </hbox>
     </vbox>
   </wizardpage>
 
   <!-- Account name page : User gets a choice to enter a pretty name for the account -->
   <!-- Defaults : Mail account -> Email address, Newsgroup account -> Newsgroup server name -->
   <wizardpage id="accnamepage" pageid="accnamepage"
               label="&accnameTitle.label;">
     <vbox flex="1">
       <description>&accnameDesc.label;</description>
       <separator class="thin"/>
-      <hbox align="center">
-        <label class="label" value="&accnameLabel.label;" style="width: 8em;"
-               accesskey="&accnameLabel.accesskey;" control="prettyName"/>
-        <textbox id="prettyName" size="40" wsm_persist="true" flex="1" oninput="acctNamePageValidate();"/>
+      <hbox align="center" class="input-container">
+        <label id="prettyNameLabel" class="label"
+               value="&accnameLabel.label;"
+               style="width: 8em;"
+               accesskey="&accnameLabel.accesskey;"
+               control="prettyName"/>
+        <html:input id="prettyName"
+                    type="text"
+                    size="40"
+                    wsm_persist="true"
+                    class="input-inline"
+                    aria-labelledby="prettyNameLabel"
+                    oninput="acctNamePageValidate();"/>
       </hbox>
     </vbox>
   </wizardpage>
 
   <!-- Done page : this page summarizes information collected to create a mail/news account -->
   <wizardpage id="done" pageid="done"
               label="&completionTitle.label;">
     <vbox flex="1">