[orca] Web: Apply removed-child recovery logic to live regions



commit 86572abf299181988d33c1eaf0d1c199b54403bf
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Jun 25 19:03:11 2021 +0200

    Web: Apply removed-child recovery logic to live regions
    
    In order to be performant, onChildrenRemoved returns early when the event
    comes from a live region. However, if a user is navigating in live region
    content and lands on something which disappears, we still want to try and
    recovery rather than risk looping to the top of the page.

 src/orca/scripts/web/script.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index 0d61ac8e6..204f0c489 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1844,8 +1844,12 @@ class Script(default.Script):
             return True
 
         if self.utilities.isLiveRegion(event.source):
-            msg = "WEB: Ignoring removal from live region."
-            debug.println(debug.LEVEL_INFO, msg, True)
+            if self.utilities.handleEventForRemovedChild(event):
+                msg = "WEB: Event handled for removed live-region child."
+                debug.println(debug.LEVEL_INFO, msg, True)
+            else:
+                msg = "WEB: Ignoring removal from live region."
+                debug.println(debug.LEVEL_INFO, msg, True)
             return True
 
         document = self.utilities.getTopLevelDocumentForObject(event.source)


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