Bug 810372 - don't add app urls to utterances. r=davidb
authorEitan Isaacson <eitan@monotonous.org>
Mon, 12 Nov 2012 15:46:09 -0800
changeset 113031 ae60a01fc2626590b5d01976f25ab22c58228ffc
parent 113030 543413e0df7007b2b516f401cbfaef7d9589c7df
child 113032 26c2e6c1c22e157ec05625d42929bef364fb4204
push id17897
push usereisaacson@mozilla.com
push dateMon, 12 Nov 2012 23:46:19 +0000
treeherdermozilla-inbound@ae60a01fc262 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdavidb
bugs810372
milestone19.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 810372 - don't add app urls to utterances. r=davidb
accessible/src/jsat/UtteranceGenerator.jsm
--- a/accessible/src/jsat/UtteranceGenerator.jsm
+++ b/accessible/src/jsat/UtteranceGenerator.jsm
@@ -242,16 +242,25 @@ this.UtteranceGenerator = {
       let utterance =
         [gStringBundle.formatStringFromName(
            'objItemOf', [localizedRole, itemno.value, itemof.value], 3)];
 
       if (name)
         utterance.push(name);
 
       return utterance;
+    },
+
+    application: function application(aAccessible, aRoleStr, aStates, aFlags) {
+      // Don't utter location of applications, it gets tiring.
+      if (aAccessible.name != aAccessible.DOMNode.location)
+        return this.objectUtteranceFunctions.defaultFunc(
+          aAccessible, aRoleStr, aStates, aFlags);
+
+      return [];
     }
   },
 
   _getLocalizedRole: function _getLocalizedRole(aRoleStr) {
     try {
       return gStringBundle.GetStringFromName(aRoleStr.replace(' ', ''));
     } catch (x) {
       return '';