[orca] Present aria-roledescription value before mark/highlight start message



commit c39625bc613d69028b6b134f07ca946af121758c
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Feb 28 12:19:25 2020 +0100

    Present aria-roledescription value before mark/highlight start message

 src/orca/script_utilities.py | 3 +++
 src/orca/speech_generator.py | 9 ++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 60c7bdc90..397438983 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -4690,6 +4690,9 @@ class Utilities:
         setSize = len(siblings)
         return position, setSize
 
+    def getRoleDescription(self, obj):
+        return ""
+
     def getCachedTextSelection(self, obj):
         textSelections = self._script.pointOfReference.get('textSelections', {})
         start, end, string = textSelections.get(hash(obj), (0, 0, ''))
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 092dc7862..98983a02a 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -410,7 +410,14 @@ class SpeechGenerator(generator.Generator):
         if startOffset != 0:
             return []
 
-        result = [messages.CONTENT_MARK_START]
+        result = []
+        roledescription = self._script.utilities.getRoleDescription(obj)
+        if roledescription:
+            result.append(roledescription)
+            result.extend(self.voice(SYSTEM))
+            result.extend(self._generatePause(obj, **args))
+
+        result.append(messages.CONTENT_MARK_START)
         result.extend(self.voice(SYSTEM))
         return result
 


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