[orca] Return role rather than name for flat review of table rows



commit c088a40bfed03ce67987d51700dbf0514854a307
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sun May 5 16:35:13 2019 -0400

    Return role rather than name for flat review of table rows
    
    Table rows typically derive their name from their cell children.
    As a result, we're double-presenting row contents in flat review.
    Presenting the role instead is more informative and less chatty.

 src/orca/flat_review.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/flat_review.py b/src/orca/flat_review.py
index 78065cba6..d4bed2794 100644
--- a/src/orca/flat_review.py
+++ b/src/orca/flat_review.py
@@ -796,7 +796,11 @@ class Context:
                                   pyatspi.ROLE_PROGRESS_BAR]:
             zones.append(ValueZone(accessible, *extents))
         elif not zones:
-            string = self.script.speechGenerator.getName(accessible)
+            string = ""
+            redundant = [pyatspi.ROLE_TABLE_ROW]
+            if role not in redundant:
+                string = self.script.speechGenerator.getName(accessible)
+
             useless = [pyatspi.ROLE_TABLE_CELL, pyatspi.ROLE_LABEL]
             if not string and role not in useless:
                 string = self.script.speechGenerator.getRoleName(accessible)


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