[orca] Chromium: Don't treat children-changed for live region table as redundant
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Chromium: Don't treat children-changed for live region table as redundant
- Date: Tue, 27 Aug 2019 16:46:44 +0000 (UTC)
commit 2338eea70e23114c52bfa7825905cf1154a1e9f6
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Aug 27 12:45:11 2019 -0400
Chromium: Don't treat children-changed for live region table as redundant
If an entire table is added as part of a live region event, we might not
see valid, in-order text-insertion events for the cells.
.../scripts/toolkits/Chromium/script_utilities.py | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Chromium/script_utilities.py
b/src/orca/scripts/toolkits/Chromium/script_utilities.py
index 7d5ea80f9..61180f620 100644
--- a/src/orca/scripts/toolkits/Chromium/script_utilities.py
+++ b/src/orca/scripts/toolkits/Chromium/script_utilities.py
@@ -350,18 +350,25 @@ class Utilities(web.Utilities):
self.grabFocus(link)
def handleAsLiveRegion(self, event):
+ if not super().handleAsLiveRegion(event):
+ return False
+
+ if not event.type.startswith("object:children-changed:add"):
+ return True
+
# At least some of the time, we're getting text insertion events immediately
# followed by children-changed events to tell us that the object whose text
# changed is now being added to the accessibility tree. Furthermore the
# additions are not always coming to us in presentational order, whereas
- # the text changes appear to be. Since testing thus far suggests we can rely
- # upon the text insertions, ignore the children-changed events.
- if event.type.startswith("object:children-changed:add"):
- msg = "CHROMIUM: Event is believed to be redundant live region notification"
- debug.println(debug.LEVEL_INFO, msg, True)
- return False
+ # the text changes appear to be. So most of the time, we can ignore the
+ # children-changed events. Except for when we can't.
+
+ if event.any_data.getRole() == pyatspi.ROLE_TABLE:
+ return True
- return super().handleAsLiveRegion(event)
+ msg = "CHROMIUM: Event is believed to be redundant live region notification"
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return False
def getFindResultsCount(self, root=None):
root = root or self._findContainer
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]