[orca] Fix some chattiness with SayAll in web content



commit e03ad4cabb0d6e8d437dd6ee11dafb435b09e702
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sat Sep 29 09:56:49 2018 -0400

    Fix some chattiness with SayAll in web content

 src/orca/scripts/web/speech_generator.py | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/orca/scripts/web/speech_generator.py b/src/orca/scripts/web/speech_generator.py
index 2a01aa184..615d070e2 100644
--- a/src/orca/scripts/web/speech_generator.py
+++ b/src/orca/scripts/web/speech_generator.py
@@ -49,6 +49,9 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
         if not self._script.utilities.inDocumentContent(obj):
             return super()._generateAncestors(obj, **args)
 
+        if self._script.inSayAll() and obj == orca_state.locusOfFocus:
+            return []
+
         result = []
         priorObj = args.get('priorObj')
         if priorObj and self._script.utilities.inDocumentContent(priorObj):
@@ -252,6 +255,9 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
 
     # TODO - JD: Yet another dumb generator method we should kill.
     def _generateTextRole(self, obj, **args):
+        if self._script.inSayAll():
+            return []
+
         return self._generateRoleName(obj, **args)
 
     def getLocalizedRoleName(self, obj, **args):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]