Bug 932158 - ensuring that the type information is not included into the output for an input of type 'text'. r=eeejay
authorYura Zenevich <yura.zenevich@gmail.com>
Fri, 01 Nov 2013 09:38:41 -0400
changeset 153046 0dd10890c2409291bf726fdb4e5291bd5fe22f73
parent 153045 0fdae4f78c1a9f6684caa0b6515820c05a17756f
child 153047 1e69387b6d8b6ad59edf40fbad1c6bb85edcbc29
push id25566
push userryanvm@gmail.com
push dateFri, 01 Nov 2013 18:40:05 +0000
treeherdermozilla-central@5bb07c1ae9f5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerseeejay
bugs932158
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 932158 - ensuring that the type information is not included into the output for an input of type 'text'. r=eeejay --- accessible/src/jsat/OutputGenerator.jsm | 3 ++- accessible/tests/mochitest/jsat/test_utterance_order.html | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-)
accessible/src/jsat/OutputGenerator.jsm
accessible/tests/mochitest/jsat/test_utterance_order.html
--- a/accessible/src/jsat/OutputGenerator.jsm
+++ b/accessible/src/jsat/OutputGenerator.jsm
@@ -211,17 +211,18 @@ this.OutputGenerator = {
    * @param {String} aRoleStr aAccessible's role string.
    */
   _addType: function _addType(aDesc, aAccessible, aRoleStr) {
     if (aRoleStr !== 'entry') {
       return;
     }
 
     let typeName = Utils.getAttributes(aAccessible)['text-input-type'];
-    if (!typeName) {
+    // Ignore the the input type="text" case.
+    if (!typeName || typeName === 'text') {
       return;
     }
     aDesc.push(gStringBundle.GetStringFromName('textInputType_' + typeName));
   },
 
   get outputOrder() {
     if (!this._utteranceOrder) {
       this._utteranceOrder = new PrefCache('accessibility.accessfu.utterance');
--- a/accessible/tests/mochitest/jsat/test_utterance_order.html
+++ b/accessible/tests/mochitest/jsat/test_utterance_order.html
@@ -102,16 +102,19 @@ https://bugzilla.mozilla.org/show_bug.cg
           ]
         }, {
           accOrElmOrID: "url",
           expected: [
             ["URL entry", "http://example.com"],
             ["http://example.com", "URL entry"]
           ]
         }, {
+          accOrElmOrID: "textInput",
+          expected: [["entry", "This is text."], ["This is text.", "entry"]]
+        }, {
           // Test pivot to list from li_one.
           accOrElmOrID: "list",
           oldAccOrElmOrID: "li_one",
           expected: [
             ["list 1 item", "First item", "1.", "list one"],
             ["1.", "list one", "First item", "list 1 item"]
           ]
         }, {
@@ -298,11 +301,12 @@ https://bugzilla.mozilla.org/show_bug.cg
       <label id="label3">First name: <input id="input3" value="Joe"></label>
       <label id="label4">Points:
         <input id="input4" type="range" name="points" min="1" max="10" value="3">
       </label>
       <input id="email" type="email" value="test@example.com" />
       <input id="search" type="search" value="This is a search" />
       <input id="tel" type="tel" value="555-5555" />
       <input id="url" type="url" value="http://example.com" />
+      <input id="textInput" type="text" value="This is text." />
     </div>
   </body>
 </html>