[orca] Web: Fix bogus assumption in allItemsSelected
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Web: Fix bogus assumption in allItemsSelected
- Date: Fri, 19 Nov 2021 13:56:58 +0000 (UTC)
commit d2567f6823c5dee72bdf86dbb4f662f6648d53ea
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Nov 19 14:53:03 2021 +0100
Web: Fix bogus assumption in allItemsSelected
allItemsSelected was assuming that the selected items in a container
supporting the selection interface would be immediate children. That
is not always the case, such as in ARIA listboxes with a group child
and the Chromium datalist popup.
src/orca/script_utilities.py | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index ae32cec41..e6d7b8bd4 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -5770,7 +5770,17 @@ class Utilities:
if role in [pyatspi.ROLE_COMBO_BOX, pyatspi.ROLE_MENU]:
return False
+ selection = obj.querySelection()
+ if not selection.nSelectedChildren:
+ return False
+
if self.selectedChildCount(obj) == obj.childCount:
+ # The selection interface gives us access to what is selected, which might
+ # not actually be a direct child.
+ child = selection.getSelectedChild(0)
+ if child not in obj:
+ return False
+
msg = "INFO: All %i children believed to be selected" % obj.childCount
debug.println(debug.LEVEL_INFO, msg, True)
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]