[orca/570658] Fix getting the label for XUL combo boxes
- From: William Walker <wwalker src gnome org>
 
- To: svn-commits-list gnome org
 
- Subject: [orca/570658] Fix getting the label for XUL combo boxes
 
- Date: Thu, 21 May 2009 11:47:59 -0400 (EDT)
 
commit 91b654a74031ca2ef654864b2118d6312e5ead2d
Author: Willie Walker <william walker sun com>
Date:   Thu May 21 11:46:01 2009 -0400
    Fix getting the label for XUL combo boxes
---
 .../scripts/toolkits/Gecko/speech_generator.py     |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/orca/scripts/toolkits/Gecko/speech_generator.py b/src/orca/scripts/toolkits/Gecko/speech_generator.py
index 3f6b27b..f3028e8 100644
--- a/src/orca/scripts/toolkits/Gecko/speech_generator.py
+++ b/src/orca/scripts/toolkits/Gecko/speech_generator.py
@@ -128,6 +128,16 @@ class SpeechGenerator(speechgenerator.SpeechGenerator):
             label = self._script.guessTheLabel(obj)
             if label:
                 result.append(label)
+
+        # XUL combo boxes don't always have a label for/by
+        # relationship.  But, they will make their names be
+        # the string of the thing labelling them.
+        #
+        if not len(result) \
+           and role == pyatspi.ROLE_COMBO_BOX \
+           and not self._script.inDocumentContent():
+            result.append(obj.name)
+
         return result
 
     def _getLabelAndName(self, obj, **args):
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]