[orca] Prevent details-for info from being repeated in multi-line containers



commit 4885cef118b110c00d65959df88f452bb27bb5ac
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Feb 26 16:32:24 2020 +0100

    Prevent details-for info from being repeated in multi-line containers

 src/orca/scripts/web/speech_generator.py | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/orca/scripts/web/speech_generator.py b/src/orca/scripts/web/speech_generator.py
index 04b0b39f0..25a3f3060 100644
--- a/src/orca/scripts/web/speech_generator.py
+++ b/src/orca/scripts/web/speech_generator.py
@@ -252,6 +252,14 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
         if args.get('leaving'):
             return []
 
+        lastKey, mods = self._script.utilities.lastKeyAndModifiers()
+        if (lastKey in ['Down', 'Right'] or self._script.inSayAll()) and args.get('startOffset'):
+            return []
+        if lastKey in ['Up', 'Left']:
+            text = self._script.utilities.queryNonEmptyText(obj)
+            if text and args.get('endOffset') not in [None, text.characterCount]:
+                return []
+
         objString = lambda x: "%s %s" % (x.name, self.getLocalizedRoleName(x))
         toPresent = ", ".join(list(map(objString, objs)))
 


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