Skip to content

Commit

Permalink
Don't generate tutorial messages for document content.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
joanmarie committed Aug 21, 2019
1 parent 95c2eeb commit e99f07c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/orca/tutorialgenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,15 @@ def getTutorial(self, obj, alreadyFocused, forceTutorial=False, role=None):
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)
Expand Down

0 comments on commit e99f07c

Please sign in to comment.