[orca/gnome-42] Structural Navigation: Handle unimplemented collection interface error
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-42] Structural Navigation: Handle unimplemented collection interface error
- Date: Tue, 17 May 2022 12:21:32 +0000 (UTC)
commit 1e9062062e93e3506211074a147fca11cf8b08cf
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue May 17 14:14:09 2022 +0200
Structural Navigation: Handle unimplemented collection interface error
The collection interface is something applications and toolkits get
"for free" from AT-SPI2. However, applications/toolkits that provide
their own implementation of AT-SPI2 (e.g. WebKitGtk) presumably need
to also implement AtspiCollection themselves, or do something so that
the default AT-SPI2 implementation is used. Currently, in WebKitGtk
version 2.36, a non-implemented error occurs when querying the
collection interface on the document. We were not handling this error,
causing Orca to be silent when structural navigation commands were
used. This commit handles the error. It cannot solve the missing
implementation, however. Thus in WebKitGtk apps, Orca will now announce
things like "no more headings" when there are in fact headings present.
See issue #244
src/orca/structural_navigation.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index bb78ed650..c933fdf7a 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -869,7 +869,17 @@ class StructuralNavigation:
if matches:
return matches.copy(), criteria
- col = document.queryCollection()
+ try:
+ col = document.queryCollection()
+ except NotImplementedError:
+ msg = "STRUCTURAL NAVIGATION: %s does not implement collection" % document
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return [], None
+ except:
+ msg = "STRUCTURAL NAVIGATION: Exception querying collection on %s" % document
+ debug.println(debug.LEVEL_INFO, msg, True)
+ return [], None
+
criteria = structuralNavigationObject.criteria(col, arg)
rule = col.createMatchRule(criteria.states.raw(),
criteria.matchStates,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]