orca r4004 - in trunk: . src/orca/scripts/toolkits/Gecko



Author: joanied
Date: Wed Jun 25 22:32:58 2008
New Revision: 4004
URL: http://svn.gnome.org/viewvc/orca?rev=4004&view=rev

Log:
* src/orca/scripts/toolkits/Gecko/where_am_i.py:
  Fix for bug #530783 - Orca speaks an image map link's shape as
  part of the whereAmI info in FF3.



Modified:
   trunk/ChangeLog
   trunk/src/orca/scripts/toolkits/Gecko/where_am_i.py

Modified: trunk/src/orca/scripts/toolkits/Gecko/where_am_i.py
==============================================================================
--- trunk/src/orca/scripts/toolkits/Gecko/where_am_i.py	(original)
+++ trunk/src/orca/scripts/toolkits/Gecko/where_am_i.py	Wed Jun 25 22:32:58 2008
@@ -83,6 +83,28 @@
                 and not self._script.isAriaWidget(orca_state.locusOfFocus)):
             where_am_I.WhereAmI._speakDefaultButton(self, obj)
 
+    def _speakObjDescription(self, obj):
+        """Speaks the object's description if it is not the same as the
+        object's name or label. Overridden here because Gecko tacks on
+        the tag associated with an imagemap in the object's description.
+        We don't want to speak that information as-is.
+
+        Arguments:
+        - obj: the accessible whose description we might wish to speak
+        """
+
+        if not (obj.getRole() == pyatspi.ROLE_LINK \
+                and obj.parent.getRole() == pyatspi.ROLE_IMAGE):
+            where_am_I.WhereAmI._speakObjDescription(self, obj)
+        else:
+            # Translators: The following string is spoken to let the user
+            # know that he/she is on a link within an image map.
+            #
+            name = self._getObjName(obj)
+            if name:
+                speech.speak(name)
+            speech.speak(_("image map link"))
+
     def _collectionPageSummary(self):
         """Uses the Collection interface to get the quantity of headings, 
         forms, tables, visited and unvisited links.



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