[orca] If a suggestion has details, present them after the suggestion-end message



commit f3874c6e02261026a1bbb8ee17b77e391f5a5851
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Thu Feb 27 18:45:45 2020 +0100

    If a suggestion has details, present them after the suggestion-end message

 src/orca/speech_generator.py | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 4474b2307..092dc7862 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -352,6 +352,11 @@ class SpeechGenerator(generator.Generator):
             result.extend([messages.CONTENT_SUGGESTION_END])
             result.extend(self.voice(SYSTEM))
 
+            container = pyatspi.findAncestor(obj, self._script.utilities.hasDetails)
+            if self._script.utilities.isContentSuggestion(container):
+                result.extend(self._generatePause(obj, **args))
+                result.extend(self._generateHasDetails(container, mode=args.get('mode')))
+
         return result
 
     def _generateInsertionStart(self, obj, **args):
@@ -390,6 +395,11 @@ class SpeechGenerator(generator.Generator):
             result.extend([messages.CONTENT_SUGGESTION_END])
             result.extend(self.voice(SYSTEM))
 
+            container = pyatspi.findAncestor(obj, self._script.utilities.hasDetails)
+            if self._script.utilities.isContentSuggestion(container):
+                result.extend(self._generatePause(obj, **args))
+                result.extend(self._generateHasDetails(container, mode=args.get('mode')))
+
         return result
 
     def _generateMarkStart(self, obj, **args):


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