[orca] An additional hack for infering Gecko listbox labels



commit d18841767bc9f1cb6a2a673c38a61fcb5b0bc284
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Fri Jan 17 12:42:19 2014 -0500

    An additional hack for infering Gecko listbox labels
    
    * Which should have STATE_FOCUSED (Mozilla bug), and
    * Which would not need infering in the first place if content creators
      properly labeled their widgets

 .../scripts/toolkits/Gecko/speech_generator.py     |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/speech_generator.py 
b/src/orca/scripts/toolkits/Gecko/speech_generator.py
index 34fcb9f..dfa56e0 100644
--- a/src/orca/scripts/toolkits/Gecko/speech_generator.py
+++ b/src/orca/scripts/toolkits/Gecko/speech_generator.py
@@ -151,7 +151,12 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
                         pyatspi.ROLE_TEXT] \
            and self._script.inDocumentContent() \
            and not self._script.isAriaWidget(obj):
-            label = self._script.labelInference.infer(obj)
+
+            # We're having to hack around yet another Mozilla bug:
+            # https://bugzilla.mozilla.org/show_bug.cgi?id=960241
+            focusedOnly = role != pyatspi.ROLE_LIST
+
+            label = self._script.labelInference.infer(obj, focusedOnly)
             if label:
                 result.append(label)
 


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