[orca] Don't generate tutorial messages for document content.



commit e99f07c9d3f297cf1ac4603d60489377497c0243
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Aug 21 15:26:08 2019 -0400

    Don't generate tutorial messages for document content.
    
    Widgets in document content don't necessarily have the same interaction
    as native toolkits. Because we can't know for certain what a keystroke
    will do, better to say nothing than to risk confusing the user with
    bogus info. Doubly-so given that tutorial messages are intended for new
    users.

 src/orca/tutorialgenerator.py | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/orca/tutorialgenerator.py b/src/orca/tutorialgenerator.py
index 994d554f7..414c499e4 100644
--- a/src/orca/tutorialgenerator.py
+++ b/src/orca/tutorialgenerator.py
@@ -778,6 +778,15 @@ class TutorialGenerator:
         if not (obj and obj == orca_state.locusOfFocus):
             return []
 
+        # Widgets in document content don't necessarily have the same interaction
+        # as native toolkits. Because we can't know for certain what a keystroke
+        # will do, better to say nothing than to risk confusing the user with
+        # bogus info.
+        if self._script.utilities.inDocumentContent(obj):
+            msg = "INFO: Not generating tutorial for document object %s." % obj
+            debug.println(debug.LEVEL_INFO, msg, True)
+            return []
+
         utterances = []
         role = role or obj.getRole()
         msg = self._getModeTutorial(obj, alreadyFocused, forceTutorial)


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