[orca] Web: Eliminate chattiness from repeated role and/or label in browse mode



commit 2718b8b8aae151de5c0e67b410f20af4fe069a55
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Dec 4 13:20:00 2020 +0100

    Web: Eliminate chattiness from repeated role and/or label in browse mode
    
    If the element hasn't changed, there's no need to repeat the already-known
    role and/or label. Example: Navigating by word in browse mode in a textarea.

 src/orca/scripts/web/speech_generator.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/scripts/web/speech_generator.py b/src/orca/scripts/web/speech_generator.py
index b7f3f0434..cbf35e379 100644
--- a/src/orca/scripts/web/speech_generator.py
+++ b/src/orca/scripts/web/speech_generator.py
@@ -317,7 +317,8 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
            and not self._script.utilities.isContentSuggestion(obj):
             return []
 
-        if self._script.inSayAll() and obj == args.get('priorObj'):
+        priorObj = args.get("priorObj")
+        if obj == priorObj:
             return []
 
         if self._script.utilities.isContentEditableWithEmbeddedObjects(obj):
@@ -325,7 +326,6 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
             if lastKey in ["Home", "End", "Up", "Down", "Left", "Right", "Page_Up", "Page_Down"]:
                 return []
 
-        priorObj = args.get("priorObj")
         if priorObj and priorObj.getRole() == pyatspi.ROLE_PAGE_TAB and priorObj.name == obj.name:
             return []
 
@@ -478,7 +478,7 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
         if not self._script.utilities.inDocumentContent(obj):
             return super()._generateRoleName(obj, **args)
 
-        if self._script.inSayAll() and obj == args.get('priorObj'):
+        if obj == args.get('priorObj'):
             return []
 
         result = []


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