Bug 1565075 - Convert textbox type=autocomplete to HTML input. r=mkmelin draft
authorAlessandro Castellani <alessandro@thunderbird.net>
Thu, 19 Sep 2019 10:54:33 -0700
changeset 79028 27b94237072e7a4b47d202b3eb5132753b0aed67
parent 79024 292f45f41c6706e461c14e60b54e796ae39dc0a0
child 79029 8ce175819a4d9946eb1068b3a935ee78fb7d2ca5
push id9341
push useralessandro@thunderbird.net
push dateThu, 19 Sep 2019 19:55:03 +0000
treeherdertry-comm-central@a7952fa48ccf [default view] [failures only]
reviewersmkmelin
bugs1565075
Bug 1565075 - Convert textbox type=autocomplete to HTML input. r=mkmelin
calendar/base/content/dialogs/calendar-event-dialog-attendees.xul
mail/components/addrbook/content/abEditListDialog.xul
mail/components/addrbook/content/abMailListDialog.xul
mail/components/compose/content/messengercompose.xul
mailnews/addrbook/content/abMailListDialog.js
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees.xul
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees.xul
@@ -77,17 +77,17 @@
       <calendar-event-attendees-list flex="1" id="attendees-list" class="listbox-noborder" orient="vertical">
         <richlistitem class="addressingWidgetItem" allowevents="true">
           <hbox class="addressingWidgetCell" width="27" align="center" pack="center">
             <image class="status-icon"/>
           </hbox>
           <hbox class="addressingWidgetCell" width="16">
             <image class="usertype-icon"/>
           </hbox>
-          <hbox class="addressingWidgetCell" flex="1">
+          <hbox class="addressingWidgetCell" flex="1" role="combobox">
             <html:input is="autocomplete-input" id="attendeesInput"
                         class="plain textbox-addressingWidget uri-element"
                         autocompletesearch="addrbook ldap"
                         autocompletesearchparam="{}"
                         timeout="300"
                         maxrows="4"
                         completedefaultindex="true"
                         forcecomplete="true"
--- a/mail/components/addrbook/content/abEditListDialog.xul
+++ b/mail/components/addrbook/content/abEditListDialog.xul
@@ -53,20 +53,21 @@
     <spacer style="height:1em"/>
     <label control="addressCol1#1"
            value="&AddressTitle.label;"
            accesskey="&AddressTitle.accesskey;"/>
     <spacer style="height:0.1em"/>
 
     <richlistbox id="addressingWidget" style="height: 15em;" onclick="awClickEmptySpace(event.target, true)">
       <richlistitem class="addressingWidgetItem" allowevents="true">
-        <hbox class="addressingWidgetCell input-container" flex="1">
+        <hbox class="addressingWidgetCell input-container" flex="1" role="combobox">
           <image onclick="this.nextElementSibling.select();" class="person-icon"/>
           <html:input is="autocomplete-input" id="addressCol1#1"
                       class="plain textbox-addressingWidget uri-element"
+                      aria-labelledby="addressCol1#1"
                       autocompletesearch="addrbook ldap"
                       autocompletesearchparam="{}"
                       timeout="300"
                       maxrows="4"
                       completedefaultindex="true"
                       forcecomplete="true"
                       completeselectedindex="true"
                       minresultsforpopup="3"
--- a/mail/components/addrbook/content/abMailListDialog.xul
+++ b/mail/components/addrbook/content/abMailListDialog.xul
@@ -66,20 +66,21 @@
     <spacer style="height:1em"/>
     <label control="addressCol1#1"
            value="&AddressTitle.label;"
            accesskey="&AddressTitle.accesskey;"/>
     <spacer style="height:0.1em"/>
 
     <richlistbox id="addressingWidget" style="height: 15em;" onclick="awClickEmptySpace(event.target, true)">
       <richlistitem class="addressingWidgetItem" allowevents="true">
-        <hbox class="addressingWidgetCell input-container" flex="1">
+        <hbox class="addressingWidgetCell input-container" flex="1" role="combobox">
           <image onclick="this.nextElementSibling.select();" class="person-icon"/>
           <html:input is="autocomplete-input" id="addressCol1#1"
                       class="plain textbox-addressingWidget uri-element"
+                      aria-labelledby="addressCol1#1"
                       autocompletesearch="addrbook ldap"
                       autocompletesearchparam="{}"
                       timeout="300"
                       maxrows="4"
                       completedefaultindex="true"
                       forcecomplete="true"
                       completeselectedindex="true"
                       minresultsforpopup="3"
--- a/mail/components/compose/content/messengercompose.xul
+++ b/mail/components/compose/content/messengercompose.xul
@@ -2030,17 +2030,17 @@
                     <menuitem value="addr_cc" label="&ccAddr.label;"/>
                     <menuitem value="addr_bcc" label="&bccAddr.label;"/>
                     <menuitem value="addr_reply" label="&replyAddr.label;"/>
                     <menuitem value="addr_newsgroups" label="&newsgroupsAddr.label;"/>
                     <menuitem value="addr_followup" label="&followupAddr.label;"/>
                   </menupopup>
                 </menulist>
               </hbox>
-              <hbox class="addressingWidgetCell input-container" flex="1">
+              <hbox class="addressingWidgetCell input-container" flex="1" role="combobox">
                 <html:input is="autocomplete-input" id="addressCol2#1"
                             class="plain textbox-addressingWidget uri-element"
                             aria-labelledby="addressCol1#1"
                             autocompletesearch="mydomain addrbook ldap news"
                             autocompletesearchparam="{}"
                             timeout="300"
                             maxrows="6"
                             completedefaultindex="true"
--- a/mailnews/addrbook/content/abMailListDialog.js
+++ b/mailnews/addrbook/content/abMailListDialog.js
@@ -422,17 +422,17 @@ function awAppendNewRow(setFocus) {
       input.value = "";
       input.setAttribute("id", "addressCol1#" + top.MAX_RECIPIENTS);
     }
     // Focus the new input widget.
     if (setFocus && input) {
       awSetFocusTo(input);
     }
   }
-  return input ? input : null;
+  return input;
 }
 
 // functions for accessing the elements in the addressing widget
 
 function awGetInputElement(row) {
   return document.getElementById("addressCol1#" + row);
 }