[orca/gnome-3-36] Don't present load completed if we are in focus mode for a valid object



commit 09b6b42496915d9f4cb6aec6f471a69a587b90cf
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Apr 10 17:54:57 2020 -0400

    Don't present load completed if we are in focus mode for a valid object
    
    Sometimes we get a focus event in a web app while the page is still
    loading. In this instance, we don't want to announce that the page has
    finished loading or provide the summary because it delays the user who
    wants to interact with the application.

 src/orca/scripts/web/script.py | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index b369ccae2..da1eba38c 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1338,6 +1338,10 @@ class Script(default.Script):
             shouldPresent = False
             msg = "WEB: Not presenting because source lacks URI"
             debug.println(debug.LEVEL_INFO, msg, True)
+        elif not event.detail1 and self._inFocusMode and not self.utilities.isZombie(obj):
+            shouldPresent = False
+            msg = "WEB: Not presenting due to focus mode for %s" % obj
+            debug.println(debug.LEVEL_INFO, msg, True)
 
         if not _settingsManager.getSetting('onlySpeakDisplayedText') and shouldPresent:
             if event.detail1:


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