[orca] Present aria-roledescription for non-focusable landmarks
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Present aria-roledescription for non-focusable landmarks
- Date: Fri, 2 Oct 2015 00:00:31 +0000 (UTC)
commit cf9b7dca489d442a00cc01acbb4cbf8d65e2a1f3
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Thu Oct 1 19:59:02 2015 -0400
Present aria-roledescription for non-focusable landmarks
src/orca/formatting.py | 2 +-
src/orca/scripts/web/script_utilities.py | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/formatting.py b/src/orca/formatting.py
index 43b2dce..6ff2b3a 100644
--- a/src/orca/formatting.py
+++ b/src/orca/formatting.py
@@ -294,7 +294,7 @@ formatting = {
},
pyatspi.ROLE_PANEL: {
'focused': 'labelAndName + roleName',
- 'unfocused': '(substring and currentLineText) or (labelAndName + roleName)'
+ 'unfocused': '((substring and currentLineText) or labelAndName) + roleName'
},
pyatspi.ROLE_PARAGRAPH: {
'focused': 'labelOrName + readOnly + textRole + currentLineText + allTextSelection',
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 9094b79..0fe5cdc 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -824,11 +824,13 @@ class Utilities(script_utilities.Utilities):
math = self.getMathAncestor(obj)
return [[math, 0, 1, '']]
- if obj.getRole() == pyatspi.ROLE_INTERNAL_FRAME and obj.childCount == 1:
+ role = obj.getRole()
+ if role == pyatspi.ROLE_INTERNAL_FRAME and obj.childCount == 1:
return self._getContentsForObj(obj[0], 0, boundary)
string, start, end = self._getTextAtOffset(obj, offset, boundary)
- if not string:
+ # Check for ROLE_SECTION due to https://bugzilla.mozilla.org/show_bug.cgi?id=1210630
+ if not string or (self.isLandmark(obj) and role != pyatspi.ROLE_SECTION):
return [[obj, start, end, string]]
stringOffset = offset - start
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]