[orca/gnome-3-20] Don't use generated text as name for web content which exposes a name



commit f371fd69b8fb862198181077c43198e012bc1cda
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]