Index: src/orca/scripts/apps/Thunderbird/speech_generator.py
===================================================================
--- src/orca/scripts/apps/Thunderbird/speech_generator.py	(revision 3950)
+++ src/orca/scripts/apps/Thunderbird/speech_generator.py	(working copy)
@@ -26,9 +26,12 @@
 __copyright__ = "Copyright (c) 2005-2008 Sun Microsystems Inc."
 __license__   = "LGPL"
 
+import pyatspi
+
 import orca.debug as debug
 import orca.scripts.toolkits.Gecko as Gecko
 
+from orca.orca_i18n import _
 
 ########################################################################
 #                                                                      #
@@ -52,3 +55,39 @@
         """ Convenience method for printing debug messages
         """
         debug.println(self.debugLevel, "Thunderbird.SpeechGenerator: "+msg)
+
+    def _getSpeechForAlert(self, obj, already_focused):
+        """Gets the title of the dialog and the contents of labels inside the
+        dialog that are not associated with any other objects.
+
+        Arguments:
+        - obj: the Accessible dialog
+        - already_focused: False if object just received focus
+
+        Returns a list of utterances be spoken.
+        """
+
+        # If this is the spell checking dialog, then just return the title
+        # of the dialog. See bug #535192 for more details.
+        #
+        rolesList = [pyatspi.ROLE_DIALOG, \
+                     pyatspi.ROLE_APPLICATION]
+        if self._script.isDesiredFocusedItem(obj, rolesList):
+            # Translators: this is what the name of the spell checking
+            # dialog in Thunderbird begins with. The translated form
+            # has to match what Thunderbird is using.  We hate keying
+            # off stuff like this, but we're forced to do so in this case.
+            #
+            if obj.name.startswith(_("Check Spelling")):
+                utterances = []
+                utterances.extend(self._getSpeechForObjectName(obj))
+
+                self._debugGenerator("Thunderbird: _getSpeechForAlert",
+                                     obj,
+                                     already_focused,
+                                     utterances)
+
+                return utterances
+
+        return Gecko.SpeechGenerator._getSpeechForAlert(self, obj,
+                                                        already_focused)
Index: src/orca/scripts/apps/Thunderbird/script.py
===================================================================
--- src/orca/scripts/apps/Thunderbird/script.py	(revision 3950)
+++ src/orca/scripts/apps/Thunderbird/script.py	(working copy)
@@ -104,6 +104,27 @@
             orca.setLocusOfFocus(event, acc)
             consume = True
 
+        # If we get a "focus:" event for the "Replace with:" entry in the
+        # spell checking dialog, then clear the current locus of focus so
+        # that this item will be spoken and brailled. See bug #535192 for
+        # more details.
+        #
+        if event.type.startswith("focus:"):
+            rolesList = [pyatspi.ROLE_ENTRY, \
+                         pyatspi.ROLE_DIALOG, \
+                         pyatspi.ROLE_APPLICATION]
+            if self.isDesiredFocusedItem(obj, rolesList):
+                dialog = obj.parent
+
+                # Translators: this is what the name of the spell checking
+                # dialog in Thunderbird begins with. The translated form
+                # has to match what Thunderbird is using.  We hate keying
+                # off stuff like this, but we're forced to do so in this case.
+                #
+                if dialog.name.startswith(_("Check Spelling")):
+                    orca_state.locusOfFocus = None
+                    orca.setLocusOfFocus(event, obj)
+
         # Handle dialogs.
         #
         if top and top.getRole() == pyatspi.ROLE_DIALOG:
@@ -163,6 +184,38 @@
         #
         return
 
+    def onNameChanged(self, event):
+        """Called whenever a property on an object changes.
+
+        Arguments:
+        - event: the Event
+        """
+
+        obj = event.source
+
+        # If we get a "object:property-change:accessible-name" event for 
+        # the first item in the Suggestions lists for the spell checking
+        # dialog, then speak the first two labels in that dialog. These
+        # will by the "Misspelled word:" label and the currently misspelled
+        # word. See bug #535192 for more details.
+        #
+        rolesList = [pyatspi.ROLE_LIST_ITEM, \
+                     pyatspi.ROLE_LIST, \
+                     pyatspi.ROLE_DIALOG, \
+                     pyatspi.ROLE_APPLICATION]
+        if self.isDesiredFocusedItem(obj, rolesList):
+            dialog = obj.parent.parent
+
+            # Translators: this is what the name of the spell checking 
+            # dialog in Thunderbird begins with. The translated form
+            # has to match what Thunderbird is using.  We hate keying
+            # off stuff like this, but we're forced to do so in this case.
+            #
+            if dialog.name.startswith(_("Check Spelling")):
+                if obj.getIndexInParent() == 0:
+                    speech.speak(self.getDisplayedText(dialog[0]))
+                    speech.speak(self.getDisplayedText(dialog[1]))
+
     def _speakEnclosingPanel(self, obj):
         """Speak the enclosing panel for the object, if it is
         named. Going two containers up the hierarchy appears to be far
