[orca] Use the isAnchor() method when setting the caret for structural navigation
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Use the isAnchor() method when setting the caret for structural navigation
- Date: Fri, 29 May 2015 00:32:16 +0000 (UTC)
commit 987d8b7fb4fc5081dba9ab507de222a51e01b7b4
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu May 28 20:15:33 2015 -0400
Use the isAnchor() method when setting the caret for structural navigation
This method eliminates false positives e.g.(non-focusable links with onClick
handlers).
.../toolkits/Gecko/structural_navigation.py | 3 +--
.../html_struct_nav_heading_with_clickable.py | 6 ++----
2 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/structural_navigation.py
b/src/orca/scripts/toolkits/Gecko/structural_navigation.py
index 02c5ef0..fa5620c 100644
--- a/src/orca/scripts/toolkits/Gecko/structural_navigation.py
+++ b/src/orca/scripts/toolkits/Gecko/structural_navigation.py
@@ -122,8 +122,7 @@ class GeckoStructuralNavigation(structural_navigation.StructuralNavigation):
# If it's an anchor, look for the first object of use.
# See bug #591592.
#
- if obj.getRole() == pyatspi.ROLE_LINK \
- and not obj.getState().contains(pyatspi.STATE_FOCUSABLE):
+ if self._script.utilities.isAnchor(obj):
obj, offset = self._script.utilities.findNextCaretInOrder(obj, offset)
return obj, offset
diff --git a/test/keystrokes/firefox/html_struct_nav_heading_with_clickable.py
b/test/keystrokes/firefox/html_struct_nav_heading_with_clickable.py
index 28e9e5c..f909b7b 100644
--- a/test/keystrokes/firefox/html_struct_nav_heading_with_clickable.py
+++ b/test/keystrokes/firefox/html_struct_nav_heading_with_clickable.py
@@ -13,11 +13,9 @@ sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("h"))
sequence.append(utils.AssertPresentationAction(
"1. h for next heading",
- ["KNOWN ISSUE: We're not speaking the initial letter",
- "BRAILLE LINE: 'line 2 h1'",
+ ["BRAILLE LINE: 'line 2 h1'",
" VISIBLE: 'line 2 h1', cursor=1",
- "SPEECH OUTPUT: 'ine 2'",
- "SPEECH OUTPUT: 'link heading level 1 clickable'"]))
+ "SPEECH OUTPUT: 'line 2 link heading level 1 clickable'"]))
sequence.append(utils.AssertionSummaryAction())
sequence.start()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]