[orca] Eliminate double presentation of focused child in live region alert
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Eliminate double presentation of focused child in live region alert
- Date: Thu, 3 Oct 2019 14:54:26 +0000 (UTC)
commit 437cb408c700fbb1679c2d3f82da0dbd11d82ddf
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Oct 3 10:53:14 2019 -0400
Eliminate double presentation of focused child in live region alert
src/orca/scripts/web/script_utilities.py | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 877d5e58b..1eda759c0 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -4361,6 +4361,14 @@ class Utilities(script_utilities.Utilities):
if not self.isLiveRegion(event.source):
return False
+ if event.type.startswith("object:text-changed:insert"):
+ isAlert = lambda x: x and x.getRole() == pyatspi.ROLE_ALERT
+ alert = pyatspi.findAncestor(event.source, isAlert)
+ if alert and self.focusedObject(alert) == event.source:
+ msg = "WEB: Focused source will be presented as part of alert"
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return False
+
if isinstance(event.any_data, pyatspi.Accessible):
try:
role = event.any_data.getRole()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]