[orca] Improve support for presentation of nested tables during structural navigation



commit e6bedc659fa22c54346779298aaf38fff71e7123
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Dec 10 13:23:52 2014 +0100

    Improve support for presentation of nested tables during structural navigation

 .../scripts/toolkits/Gecko/script_utilities.py     |    2 +-
 src/orca/structural_navigation.py                  |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script_utilities.py 
b/src/orca/scripts/toolkits/Gecko/script_utilities.py
index f775fc0..daa6f06 100644
--- a/src/orca/scripts/toolkits/Gecko/script_utilities.py
+++ b/src/orca/scripts/toolkits/Gecko/script_utilities.py
@@ -991,7 +991,7 @@ class Utilities(script_utilities.Utilities):
                 restOfText = unicodeText[offset:len(unicodeText)]
                 objects.append([obj, childOffset + 1, end, restOfText])
  
-        if obj.getRole() in [pyatspi.ROLE_IMAGE, pyatspi.ROLE_TABLE]:
+        if obj.getRole() in [pyatspi.ROLE_IMAGE, pyatspi.ROLE_TABLE, pyatspi.ROLE_TABLE_ROW]:
             # Imagemaps that don't have alternative text won't implement
             # the text interface, but they will have children (essentially
             # EOCs) that we need to get. The same is true for tables.
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index 52a4e2e..58602ab 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -1341,6 +1341,8 @@ class StructuralNavigation:
             return False
         else:
             for child in obj:
+                if child.getRole() in [pyatspi.ROLE_TABLE, pyatspi.ROLE_PANEL]:
+                    return False
                 text = self._script.utilities.displayedText(child)
                 if text and len(text.strip()) \
                    or child.getRole() == pyatspi.ROLE_LINK:
@@ -3258,9 +3260,9 @@ class StructuralNavigation:
             self._script.presentMessage(self._getTableDescription(obj))
             cell = obj.queryTable().getAccessibleAt(0, 0)
             self.lastTableCell = [0, 0]
+            self._presentObject(cell, 0)
             [cell, characterOffset] = self._getCaretPosition(cell)
             self._setCaretPosition(cell, characterOffset)
-            self._presentObject(cell, characterOffset)
         else:
             full = messages.NO_MORE_TABLES
             brief = messages.STRUCTURAL_NAVIGATION_NOT_FOUND


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