[orca] Web: Treat all list items inside listboxes as focus mode widgets
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Web: Treat all list items inside listboxes as focus mode widgets
- Date: Fri, 29 Oct 2021 15:49:32 +0000 (UTC)
commit e42f9f8fa9999294795a9a02e43a310150ca5b77
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Oct 29 17:46:07 2021 +0200
Web: Treat all list items inside listboxes as focus mode widgets
Heuristics can fail due to authoring.
src/orca/scripts/web/script_utilities.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index d7631b581..605aa70f2 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -2125,13 +2125,19 @@ class Utilities(script_utilities.Utilities):
debug.println(debug.LEVEL_INFO, msg, True)
return False
+ if role == pyatspi.ROLE_LIST_ITEM:
+ rv = pyatspi.findAncestor(obj, lambda x: x and x.getRole() == pyatspi.ROLE_LIST_BOX)
+ if rv:
+ msg = "WEB: %s is focus mode widget because it's a listbox descendant" % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return rv
+
if self.isButtonWithPopup(obj):
msg = "WEB: %s is focus mode widget because it's a button with popup" % obj
debug.println(debug.LEVEL_INFO, msg, True)
return True
focusModeRoles = [pyatspi.ROLE_EMBEDDED,
- pyatspi.ROLE_LIST_ITEM,
pyatspi.ROLE_TABLE_CELL,
pyatspi.ROLE_TABLE]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]