[orca] Make toggle buttons and non-focusable buttons reachable via structural navigation
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Make toggle buttons and non-focusable buttons reachable via structural navigation
- Date: Mon, 10 Dec 2018 14:41:08 +0000 (UTC)
commit 9949b739cafd1daed45f9c6b1147b16dcc78680c
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Dec 10 15:40:12 2018 +0100
Make toggle buttons and non-focusable buttons reachable via structural navigation
src/orca/structural_navigation.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index 25c930b5e..c36e35392 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -1478,8 +1478,8 @@ class StructuralNavigation:
the criteria (e.g. the level of a heading).
"""
- role = [pyatspi.ROLE_PUSH_BUTTON]
- state = [pyatspi.STATE_FOCUSABLE, pyatspi.STATE_SENSITIVE]
+ role = [pyatspi.ROLE_PUSH_BUTTON, pyatspi.ROLE_TOGGLE_BUTTON]
+ state = [pyatspi.STATE_SENSITIVE]
stateMatch = collection.MATCH_ALL
return MatchCriteria(collection,
states=state,
@@ -1497,10 +1497,9 @@ class StructuralNavigation:
"""
isMatch = False
- if obj and obj.getRole() == pyatspi.ROLE_PUSH_BUTTON:
+ if obj and obj.getRole() in [pyatspi.ROLE_PUSH_BUTTON, pyatspi.ROLE_TOGGLE_BUTTON]:
state = obj.getState()
- isMatch = state.contains(pyatspi.STATE_FOCUSABLE) \
- and state.contains(pyatspi.STATE_SENSITIVE)
+ isMatch = state.contains(pyatspi.STATE_SENSITIVE)
return isMatch
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]