[orca] Chromium: Recognize anchors
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Chromium: Recognize anchors
- Date: Tue, 30 Jul 2019 21:29:42 +0000 (UTC)
commit 9febe63010a145867395a977cd0d9b4934a219b1
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Jul 30 17:27:03 2019 -0400
Chromium: Recognize anchors
Chromium implements AtkAction for anchors (unlike Gecko). Therefore, use
the absence of the "jump" action rather than the absence of AtkAction to
help distinguish real links for anchors.
src/orca/scripts/web/script_utilities.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index a8551b0c0..04fe9013a 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -2923,7 +2923,7 @@ class Utilities(script_utilities.Utilities):
rv = False
if obj.getRole() == pyatspi.ROLE_LINK \
and not obj.getState().contains(pyatspi.STATE_FOCUSABLE) \
- and not 'Action' in pyatspi.listInterfaces(obj):
+ and not 'jump' in self._getActionNames(obj):
rv = True
self._isAnchor[hash(obj)] = rv
@@ -2957,7 +2957,7 @@ class Utilities(script_utilities.Utilities):
def _getActionNames(self, obj):
try:
action = obj.queryAction()
- names = [action.getName(i) for i in range(action.nActions)]
+ names = [action.getName(i).lower() for i in range(action.nActions)]
except NotImplementedError:
return []
except:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]