[orca/gnome-42] Web: Make cell ancestor presentation optional



commit 1a37355e0788281271e388d7846543435138b52f
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 7ede6a0e1..e5e1beced 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -984,6 +984,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'))
@@ -1010,6 +1013,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'))
@@ -1114,6 +1120,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):
@@ -1149,6 +1158,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]