[orca] Web: Don't treat expandable links as focus-mode widgets
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Web: Don't treat expandable links as focus-mode widgets
- Date: Fri, 1 Apr 2022 12:33:52 +0000 (UTC)
commit ff5df30c034529c9fea5546c12a9168cbd1427a4
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Apr 1 14:20:16 2022 +0200
Web: Don't treat expandable links as focus-mode widgets
At least one (and reportedly several) online program guides are using
aria-expanded on links. The focusability plus expandability is causing
Orca to treat these links like focus mode widgets, which is inconvenient
if you landed on one using the browser's find feature and now want to
resume reading the guide via caret navigation.
This commit stops us from treating links as focus-mode widgets purely
on the basis of expandability. Other factors (such as being inside a
toolbar or menu) may still cause links to be treated as focus mode
widgets. Hopefully this change will address the program guide use case
without requiring users to manually enable focus mode for some other use
of an expandable link.
src/orca/scripts/web/script_utilities.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 1c81476d4..2aa92a08b 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -2131,7 +2131,8 @@ class Utilities(script_utilities.Utilities):
debug.println(debug.LEVEL_INFO, msg, True)
return True
- if state.contains(pyatspi.STATE_EXPANDABLE) and state.contains(pyatspi.STATE_FOCUSABLE):
+ if state.contains(pyatspi.STATE_EXPANDABLE) and state.contains(pyatspi.STATE_FOCUSABLE) \
+ and role != pyatspi.ROLE_LINK:
msg = "WEB: %s is focus mode widget because it's expandable and focusable" % obj
debug.println(debug.LEVEL_INFO, msg, True)
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]