[orca] More work on the name/displayed-text mess



commit aa9028b0b1f17fc06c0999c52a3d42406cb612d9
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date:   Wed Jan 29 11:34:50 2020 -0500

    More work on the name/displayed-text mess
    
    1. Don't even fall back on displayed text for the name. When and if
       that proves necessary, we can fix it either in the formatting
       string or make a role-specific tweak in the generator(s)
    
    2. Fix presentation of spin button, presenting the displayed text
       and falling back on the value reported by AtspiValue

 src/orca/formatting.py | 6 +++---
 src/orca/generator.py  | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/formatting.py b/src/orca/formatting.py
index 76c281697..d546b3b50 100644
--- a/src/orca/formatting.py
+++ b/src/orca/formatting.py
@@ -428,9 +428,9 @@ formatting = {
             'basicWhereAmI': 'labelOrName + roleName + value + percentage + ' + MNEMONIC + ' + accelerator + 
required + pause + invalid'
             },
         pyatspi.ROLE_SPIN_BUTTON: {
-            'focused': 'name',
-            'unfocused': 'labelAndName + allTextSelection + roleName + required + pause + invalid + 
availability + ' + MNEMONIC,
-            'basicWhereAmI': 'label + roleName + name + allTextSelection + ' + MNEMONIC + ' + accelerator + 
required + pause + invalid'
+            'focused': '(displayedText or value)',
+            'unfocused': 'labelAndName + (displayedText or value) + roleName + required + pause + invalid + 
availability + ' + MNEMONIC,
+            'basicWhereAmI': 'label + roleName + name + (displayedText or value) + ' + MNEMONIC + ' + 
accelerator + required + pause + invalid'
             },
         pyatspi.ROLE_SPLIT_PANE: {
             'focused': 'value',
diff --git a/src/orca/generator.py b/src/orca/generator.py
index 0bb8310f0..67d44ade7 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -303,7 +303,7 @@ class Generator:
         """
         result = []
         self._script.pointOfReference['usedDescriptionForName'] = False
-        name = obj.name or self._script.utilities.displayedText(obj)
+        name = obj.name
         if obj.getRole() == pyatspi.ROLE_COMBO_BOX:
             children = self._script.utilities.selectedChildren(obj)
             if not children:


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