[orca] Filter out layout-only lists when speaking context
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Filter out layout-only lists when speaking context
- Date: Sat, 21 Jan 2017 19:54:06 +0000 (UTC)
commit ff681dcdf3d124430d089def9fdd3e36ba38635d
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Sat Jan 21 14:52:26 2017 -0500
Filter out layout-only lists when speaking context
src/orca/scripts/web/script_utilities.py | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 05aacfb..4a7d322 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -2066,14 +2066,23 @@ class Utilities(script_utilities.Utilities):
return rv
def isLayoutOnly(self, obj):
- if not obj:
- return False
+ if not (obj and self.inDocumentContent(obj)):
+ return super().isLayoutOnly(obj)
rv = self._isLayoutOnly.get(hash(obj))
if rv is not None:
return rv
- if self.isMath(obj):
+ try:
+ role = obj.getRole()
+ except:
+ msg = "ERROR: Exception getting role for %s" % obj
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return False
+
+ if role == pyatspi.ROLE_LIST:
+ rv = self.treatAsDiv(obj)
+ elif self.isMath(obj):
rv = False
elif self.isLandmark(obj):
rv = False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]