[orca] Update focus when web app descendant claims focus, unless browse mode is sticky



commit 0fdb8238d9f321fb9c03260faa22e43788b670ab
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Mar 30 17:04:50 2020 -0400

    Update focus when web app descendant claims focus, unless browse mode is sticky
    
    We were already doing this for top-level web applications, but not all
    web applications put the application role on the upper-most element.
    And even when authors put the role on the body element, we cannot count
    on user agents inserting generic containers with the document role.

 src/orca/scripts/web/script.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index e6c9707fc..d18ab7a4c 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1824,12 +1824,12 @@ class Script(default.Script):
             debug.println(debug.LEVEL_INFO, msg, True)
             return False
 
-        if self.utilities.isTopLevelWebApp(document):
+        if self.utilities.isWebAppDescendant(event.source):
             if self._browseModeIsSticky:
-                msg = "WEB: Web app claimed focus, but browse mode is sticky"
+                msg = "WEB: Web app descendant claimed focus, but browse mode is sticky"
                 debug.println(debug.LEVEL_INFO, msg, True)
             else:
-                msg = "WEB: Event handled: Setting locusOfFocus to event source"
+                msg = "WEB: Event handled: Setting locusOfFocus to web app descendant"
                 debug.println(debug.LEVEL_INFO, msg, True)
                 orca.setLocusOfFocus(event, event.source)
                 return True


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