[orca] Force browse mode switch in web apps when child document claims focus
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Force browse mode switch in web apps when child document claims focus
- Date: Fri, 22 May 2020 16:42:31 +0000 (UTC)
commit d421db5ae6327daa845b4253eb90975e09ea35fb
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri May 22 12:42:07 2020 -0400
Force browse mode switch in web apps when child document claims focus
If a web app gives focus directly to a child document, there's a
reasonable chance that the child document is content to be read. An
example is switching between the VSCode editor and a page containing
documentation or information. Therefore, if the document itself claims
focus and lacks attributes which suggest it should be treated as a focus
mode widget, switch to browse mode.
src/orca/scripts/web/script_utilities.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 9761c1f13..16501f18a 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -1933,9 +1933,13 @@ class Utilities(script_utilities.Utilities):
if not self.isWebAppDescendant(obj):
return False
- if obj.getRole() == pyatspi.ROLE_TOOL_TIP:
+ role = obj.getRole()
+ if role == pyatspi.ROLE_TOOL_TIP:
return obj.getState().contains(pyatspi.STATE_FOCUSED)
+ if role == pyatspi.ROLE_DOCUMENT_WEB:
+ return not self.isFocusModeWidget(obj)
+
return False
def isFocusModeWidget(self, obj):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]