[orca] Eliminate some chattiness with repeated names in web apps



commit 131511f2af88ba7d6f9548535209e98daea7fd9d
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Wed Apr 15 17:12:04 2020 -0400

    Eliminate some chattiness with repeated names in web apps
    
    If the old focus is a page tab and the new focus has the same name,
    don't re-present the name. This reduces some chattiness in (at least)
    VSCode.

 src/orca/scripts/web/speech_generator.py | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/orca/scripts/web/speech_generator.py b/src/orca/scripts/web/speech_generator.py
index 0cc8a46eb..eaf824d84 100644
--- a/src/orca/scripts/web/speech_generator.py
+++ b/src/orca/scripts/web/speech_generator.py
@@ -321,6 +321,10 @@ 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 []
+
         if obj.name:
             name = obj.name
             if not self._script.utilities.hasExplicitName(obj):


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