[orca] Don't use generated text as name for web content which exposes a name



commit 17d311db8592f2f5e448e33e40d6fdd49a4a5611
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Apr 11 18:04:58 2016 -0400

    Don't use generated text as name for web content which exposes a name

 src/orca/scripts/web/speech_generator.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/scripts/web/speech_generator.py b/src/orca/scripts/web/speech_generator.py
index 3b95a30..8610091 100644
--- a/src/orca/scripts/web/speech_generator.py
+++ b/src/orca/scripts/web/speech_generator.py
@@ -156,6 +156,11 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
         if self._script.utilities.isTextBlockElement(obj):
             return []
 
+        if self._script.utilities.inDocumentContent(obj) and obj.name:
+            result = [obj.name]
+            result.extend(self.voice(speech_generator.DEFAULT))
+            return result
+
         return super()._generateName(obj, **args)
 
     def _generateLabel(self, obj, **args):


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