[orca] Treat non-focusable, non-selectable table rows as layout only



commit 03fed262105a8d153bcbb3ac9483c6b82a697f89
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Jan 15 11:36:01 2014 -0500

    Treat non-focusable, non-selectable table rows as layout only

 src/orca/script_utilities.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 58633ff..32cabf7 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -793,6 +793,10 @@ class Utilities:
             layoutOnly = False
         elif role in [pyatspi.ROLE_DIALOG, pyatspi.ROLE_WINDOW]:
             layoutOnly = False
+        elif self.isTableRow(obj):
+            state = obj.getState()
+            layoutOnly = not (state.contains(pyatspi.STATE_FOCUSABLE) \
+                              or state.contains(pyatspi.STATE_SELECTABLE))
         else:
             if not (self.displayedText(obj) or self.displayedLabel(obj)):
                 layoutOnly = True
@@ -1262,7 +1266,9 @@ class Utilities:
         if not obj.parent.getRole() == pyatspi.ROLE_TABLE:
             return False
 
-        isCell = lambda x: x and x.getRole() == pyatspi.ROLE_TABLE_CELL
+        isCell = lambda x: x and x.getRole() in [pyatspi.ROLE_TABLE_CELL,
+                                                 pyatspi.ROLE_ROW_HEADER,
+                                                 pyatspi.ROLE_COLUMN_HEADER]
         cellChildren = list(filter(isCell, [x for x in obj]))
         if len(cellChildren) == obj.childCount:
             return True        


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