[orca] Don't descend entries with children upon first presentation of the entry



commit e48d7da800a72deae231ea919f12611cfeff9278
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Feb 7 15:21:54 2018 -0500

    Don't descend entries with children upon first presentation of the entry

 src/orca/scripts/web/script.py           |    6 ++++++
 src/orca/scripts/web/script_utilities.py |    2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index cca826b..691f05f 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -840,6 +840,12 @@ class Script(default.Script):
         if self._lastCommandWasCaretNav or args.get("includeContext"):
             priorObj, priorOffset = self.utilities.getPriorContext()
 
+        if obj.getRole() == pyatspi.ROLE_ENTRY:
+            utterances = self.speechGenerator.generateSpeech(obj, priorObj=priorObj)
+            speech.speak(utterances)
+            self.updateBraille(obj)
+            return
+
         offset = args.get("offset", 0)
         contents = self.utilities.getObjectContentsAtOffset(obj, offset)
         self.displayContents(contents)
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index b0c9ffb..725f401 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -3550,7 +3550,7 @@ class Utilities(script_utilities.Utilities):
 
         allText = text.getText(0, -1)
         offset = max (0, offset)
-        if allText[offset] != self.EMBEDDED_OBJECT_CHARACTER:
+        if allText[offset] != self.EMBEDDED_OBJECT_CHARACTER or role == pyatspi.ROLE_ENTRY:
             msg = "WEB: First caret context for %s, %i is %s, %i" % (obj, offset, obj, offset)
             debug.println(debug.LEVEL_INFO, msg, True)
             return obj, offset


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