[orca] Make Orca speak links which have embedded images as their sole text.



commit 42366c3f3ae4d0dbd71d7ba439b760a28f79118a
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sat Dec 3 19:18:21 2011 +0100

    Make Orca speak links which have embedded images as their sole text.

 src/orca/scripts/toolkits/WebKitGtk/script.py |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/WebKitGtk/script.py b/src/orca/scripts/toolkits/WebKitGtk/script.py
index ce2ac16..8b95809 100644
--- a/src/orca/scripts/toolkits/WebKitGtk/script.py
+++ b/src/orca/scripts/toolkits/WebKitGtk/script.py
@@ -271,10 +271,6 @@ class Script(default.Script):
         - event: the Event
         """
 
-        lastKey, mods = self.utilities.lastKeyAndModifiers()
-        if lastKey in self.CARET_NAVIGATION_KEYS:
-            return True
-
         obj = event.source
         role = obj.getRole()
         if role == pyatspi.ROLE_LIST_ITEM and obj.childCount:
@@ -288,11 +284,10 @@ class Script(default.Script):
         if role in textRoles:
             return
 
-        if role == pyatspi.ROLE_LINK and obj.childCount:
-            try:
-                text = obj.queryText()
-            except NotImplementedError:
-                orca.setLocusOfFocus(event, obj[0])
+        if not (role == pyatspi.ROLE_LINK and obj.childCount):
+            lastKey, mods = self.utilities.lastKeyAndModifiers()
+            if lastKey in self.CARET_NAVIGATION_KEYS:
+                return
 
         default.Script.onFocus(self, event)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]