[orca] Only speak icon/canvas role when there is no image description



commit ca7f4a4519d778c090c85aa7e99c301662b766d3
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed May 16 11:28:18 2018 -0400

    Only speak icon/canvas role when there is no image description

 src/orca/formatting.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/formatting.py b/src/orca/formatting.py
index 34fd061..effbe8e 100644
--- a/src/orca/formatting.py
+++ b/src/orca/formatting.py
@@ -141,8 +141,8 @@ formatting = {
             'unfocused': 'roleName + pause + nestingLevel + pause + displayedText',
             },
         pyatspi.ROLE_CANVAS: {
-            'focused': 'labelAndName + imageDescription + roleName + pause + positionInList',
-            'unfocused': 'labelAndName + imageDescription + roleName + pause + positionInList',
+            'focused': 'labelAndName + (imageDescription or roleName) + pause + positionInList',
+            'unfocused': 'labelAndName + (imageDescription or roleName) + pause + positionInList',
             'basicWhereAmI': 'parentRoleName + pause + labelAndName + pause + selectedItemCount + pause',
             'detailedWhereAmI': 'parentRoleName + pause + labelAndName + pause + selectedItemCount + pause + 
selectedItems + pause'
             },
@@ -237,8 +237,8 @@ formatting = {
             'detailedWhereAmI': 'label + readOnly + textRole + pause + textContentWithAttributes + 
anyTextSelection + ' + MNEMONIC
             },
         pyatspi.ROLE_ICON: {
-            'focused': 'labelAndName + imageDescription + roleName + pause + positionInList',
-            'unfocused': 'labelAndName + imageDescription + roleName + pause + positionInList',
+            'focused': 'labelAndName + (imageDescription or roleName) + pause + positionInList',
+            'unfocused': 'labelAndName + (imageDescription or roleName) + pause + positionInList',
             'basicWhereAmI': 'parentRoleName + pause + labelAndName + pause + selectedItemCount + pause',
             'detailedWhereAmI': 'parentRoleName + pause + labelAndName + pause + selectedItemCount + pause + 
selectedItems + pause'
             },


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