[orca] Web: Make cell ancestor presentation optional



commit e74d50d8f550b3127539715fecbcecf968e10d66
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Jul 6 09:54:58 2022 +0200

    Web: Make cell ancestor presentation optional
    
    In issue #253, Orca's failure to present cell ancestor information
    when tabbing among interactive descendants of a cell was reported
    as a bug. Fixing that bug has resulted in users complaining that
    this presentation can be too chatty and should be configurable.
    In order to accomplish that without introducing new settings (and
    strings, and UI), this presentation now respects the table-related
    options found on Orca's app-specific preferences for web browsers.
    Those options had been intended just for structural navigation within
    tables, but seem to be applicable here. Because they are enabled by
    default, users who find the ancestor information too chatty will
    need to opt out by disabling that presentation.

 src/orca/speech_generator.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 0b228169b..957cbf941 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -989,6 +989,9 @@ class SpeechGenerator(generator.Generator):
         if args.get('readingRow'):
             return []
 
+        if not _settingsManager.getSetting('speakCellHeaders'):
+            return []
+
         if args.get('inMouseReview') and args.get('priorObj'):
             thisrow, thiscol = self._script.utilities.coordinatesForCell(obj)
             lastrow, lastcol = self._script.utilities.coordinatesForCell(args.get('priorObj'))
@@ -1015,6 +1018,9 @@ class SpeechGenerator(generator.Generator):
         if args.get('readingRow'):
             return []
 
+        if not _settingsManager.getSetting('speakCellHeaders'):
+            return []
+
         if args.get('inMouseReview') and args.get('priorObj'):
             thisrow, thiscol = self._script.utilities.coordinatesForCell(obj)
             lastrow, lastcol = self._script.utilities.coordinatesForCell(args.get('priorObj'))
@@ -1119,6 +1125,9 @@ class SpeechGenerator(generator.Generator):
         if args.get('readingRow'):
             return []
 
+        if not _settingsManager.getSetting('speakCellCoordinates'):
+            return []
+
         return self._generateColumn(obj, **args)
 
     def _generateColumn(self, obj, **args):
@@ -1154,6 +1163,9 @@ class SpeechGenerator(generator.Generator):
         if args.get('readingRow'):
             return []
 
+        if not _settingsManager.getSetting('speakCellCoordinates'):
+            return []
+
         return self._generateRow(obj, **args)
 
     def _generateRow(self, obj, **args):


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