Index: test/keystrokes/firefox/dojo_slider.py
===================================================================
--- test/keystrokes/firefox/dojo_slider.py	(revision 4207)
+++ test/keystrokes/firefox/dojo_slider.py	(working copy)
@@ -199,14 +199,12 @@
 sequence.append(PauseAction(1000))
 sequence.append(utils.AssertPresentationAction(
     "move to entry", 
-    ["BUG? - We're guessing other text in addition to the label",
-     "BRAILLE LINE:  'Slider1 Value: 10.0% $l'",
+    ["BRAILLE LINE:  'Slider1 Value: 10.0% $l'",
      "     VISIBLE:  'Slider1 Value: 10.0% $l', cursor=21",
      "BRAILLE LINE:  'Slider1 Value: 10.0% $l'",
      "     VISIBLE:  'Slider1 Value: 10.0% $l', cursor=21",
      "SPEECH OUTPUT: ''",
-     "SPEECH OUTPUT: 'initial value=10, min=0, max=100, pageIncrement=100, onChange event triggers input box value change immediately",
-     "Horizontal Slider Example Slider1 Value: read only text 10.0%'"]))
+     "SPEECH OUTPUT: 'Slider1 Value: read only text 10.0%'"]))
 
 ########################################################################
 # Tab to the button between the sliders.  
Index: test/keystrokes/firefox/label_guess_bugzilla_search.py
===================================================================
--- test/keystrokes/firefox/label_guess_bugzilla_search.py	(revision 4207)
+++ test/keystrokes/firefox/label_guess_bugzilla_search.py	(working copy)
@@ -494,7 +494,7 @@
     ["BRAILLE LINE:  'Sort results by: Reuse same sort as last time Combo'",
      "     VISIBLE:  'Reuse same sort as last time Com', cursor=1",
      "SPEECH OUTPUT: ''",
-     "SPEECH OUTPUT: 'Reuse same sort as last time combo box'"]))
+     "SPEECH OUTPUT: 'Sort results by: Reuse same sort as last time combo box'"]))
 
 sequence.append(utils.StartRecordingAction())
 sequence.append(KeyPressAction(0, None, "KP_Insert"))
Index: test/keystrokes/firefox/html_role_combo_box.py
===================================================================
--- test/keystrokes/firefox/html_role_combo_box.py	(revision 4207)
+++ test/keystrokes/firefox/html_role_combo_box.py	(working copy)
@@ -86,7 +86,7 @@
     ["BRAILLE LINE:  'Priority Link : Normal Combo'",
      "     VISIBLE:  'Priority Link : Normal Combo', cursor=17",
      "SPEECH OUTPUT: ''",
-     "SPEECH OUTPUT: 'Normal combo box'"]))
+     "SPEECH OUTPUT: 'Priority: Normal combo box'"]))
 
 ########################################################################
 # Press Down Arrow to change the selection to Low.  
@@ -150,7 +150,7 @@
     ["BRAILLE LINE:  'Priority Link : Low Combo'",
      "     VISIBLE:  'Priority Link : Low Combo', cursor=17",
      "SPEECH OUTPUT: ''",
-     "SPEECH OUTPUT: 'Low combo box'"]))
+     "SPEECH OUTPUT: 'Priority: Low combo box'"]))
 
 ########################################################################
 # Press Tab once to get to the Resolution combo box.
Index: test/keystrokes/firefox/label_guess_entries.py
===================================================================
--- test/keystrokes/firefox/label_guess_entries.py	(revision 4207)
+++ test/keystrokes/firefox/label_guess_entries.py	(working copy)
@@ -122,7 +122,8 @@
 sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
 sequence.append(utils.AssertPresentationAction(
     "Next form field", 
-    ["BRAILLE LINE:  ' $l'",
+    ["BUG? - Below is what we should be getting. We were accidentally getting this from guessLabelFromLine, but the guessed label isn't on this line and should be guessed by getLabelFromOtherLines",
+     "BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
      "SPEECH OUTPUT: 'First Name text'"]))
 
@@ -132,7 +133,8 @@
 sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
 sequence.append(utils.AssertPresentationAction(
     "Next form field", 
-    ["BRAILLE LINE:  ' $l'",
+    ["BUG? - Below is what we should be getting. We were accidentally getting this from guessLabelFromLine, but the guessed label isn't on this line and should be guessed by getLabelFromOtherLines",
+     "BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
      "SPEECH OUTPUT: 'M.I. text'"]))
 
@@ -142,7 +144,8 @@
 sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
 sequence.append(utils.AssertPresentationAction(
     "Next form field", 
-    ["BRAILLE LINE:  ' $l'",
+    ["BUG? - Below is what we should be getting. We were accidentally getting this from guessLabelFromLine, but the guessed label isn't on this line and should be guessed by getLabelFromOtherLines",
+     "BRAILLE LINE:  ' $l'",
      "     VISIBLE:  ' $l', cursor=1",
      "SPEECH OUTPUT: 'Last Name text'"]))
 
Index: test/keystrokes/firefox/label_guess_bug_509809.py
===================================================================
--- test/keystrokes/firefox/label_guess_bug_509809.py	(revision 0)
+++ test/keystrokes/firefox/label_guess_bug_509809.py	(revision 0)
@@ -0,0 +1,203 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+"""Test of label guess functionality, primarily by line."""
+
+from macaroon.playback import *
+import utils
+
+sequence = MacroSequence()
+
+########################################################################
+# We wait for the focus to be on a blank Firefox window.
+#
+sequence.append(WaitForWindowActivate("Minefield",None))
+
+########################################################################
+# Load the test case.
+#
+sequence.append(KeyComboAction("<Control>l"))
+sequence.append(WaitForFocus("Location", acc_role=pyatspi.ROLE_ENTRY))
+
+sequence.append(TypeAction(utils.htmlURLPrefix + "dev-accessibility.html"))
+sequence.append(KeyComboAction("Return"))
+
+sequence.append(WaitForDocLoad())
+
+sequence.append(WaitForFocus("",
+                             acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
+
+########################################################################
+# Press Control+Home to move to the top.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Control>Home"))
+sequence.append(utils.AssertPresentationAction(
+    "Top of file",
+    ["BRAILLE LINE:  'Mozilla Link h1'",
+     "     VISIBLE:  'Mozilla Link h1', cursor=1",
+     "SPEECH OUTPUT: 'Mozilla link heading level 1'"]))
+
+########################################################################
+# Press Insert+Tab to move from form field to form field.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'search mozilla: search mozilla:  $l Go Button'",
+     "     VISIBLE:  'search mozilla:  $l Go Button', cursor=17",
+     "SPEECH OUTPUT: 'search mozilla: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'search mozilla: search mozilla:  $l Go Button'",
+     "     VISIBLE:  'Go Button', cursor=1",
+     "SPEECH OUTPUT: 'Go button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  'Your email address:  $l'",
+     "     VISIBLE:  'Your email address:  $l', cursor=21",
+     "SPEECH OUTPUT: 'Your email address: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'Your name (optional):  $l'",
+     "     VISIBLE:  'Your name (optional):  $l', cursor=23",
+     "SPEECH OUTPUT: 'Your name (optional): text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'Pick a password:  $l'",
+     "     VISIBLE:  'Pick a password:  $l', cursor=18",
+     "SPEECH OUTPUT: 'Pick a password: password'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  'Reenter password to confirm:  $l'",
+     "     VISIBLE:  'Reenter password to confirm:  $l', cursor=30",
+     "SPEECH OUTPUT: 'Reenter password to confirm: password'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'a daily digest? &=y RadioButton No & y RadioButton  Yes'",
+     "     VISIBLE:  '&=y RadioButton No & y RadioButt', cursor=1",
+     "SPEECH OUTPUT: 'No selected radio button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'a daily digest? &=y RadioButton  No  Yes & y RadioButton Yes'",
+     "     VISIBLE:  '& y RadioButton Yes', cursor=1",
+     "SPEECH OUTPUT: 'Yes not selected radio button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  'Subscribe Button'",
+     "     VISIBLE:  'Subscribe Button', cursor=1",
+     "SPEECH OUTPUT: 'Subscribe button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'Admin address:  $l Password:  $l Visit Subscriber List Button'",
+     "     VISIBLE:  ' $l Password:  $l Visit Subscrib', cursor=1",
+     "SPEECH OUTPUT: 'Admin address: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'Admin address:  $l Password:  $l Visit Subscriber List Button'",
+     "     VISIBLE:  ' $l Visit Subscriber List Button', cursor=1",
+     "SPEECH OUTPUT: 'Password: password'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  'Admin address:  $l Password:  $l Visit Subscriber List Button'",
+     "     VISIBLE:  'Visit Subscriber List Button', cursor=1",
+     "SPEECH OUTPUT: 'Visit Subscriber List button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  ' $l Unsubscribe or edit options Button'",
+     "     VISIBLE:  ' $l Unsubscribe or edit options ', cursor=1",
+     "SPEECH OUTPUT: 'text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  ' $l Unsubscribe or edit options Button'",
+     "     VISIBLE:  'Unsubscribe or edit options Butt', cursor=1",
+     "SPEECH OUTPUT: 'Unsubscribe or edit options button'"]))
+
+########################################################################
+# Move to the location bar by pressing Control+L.  When it has focus
+# type "about:blank" and press Return to restore the browser to the
+# conditions at the test's start.
+#
+sequence.append(KeyComboAction("<Control>l"))
+sequence.append(WaitForFocus("Location", acc_role=pyatspi.ROLE_ENTRY))
+
+sequence.append(TypeAction("about:blank"))
+sequence.append(KeyComboAction("Return"))
+
+sequence.append(WaitForDocLoad())
+
+# Just a little extra wait to let some events get through.
+#
+sequence.append(PauseAction(3000))
+
+sequence.append(utils.AssertionSummaryAction())
+
+sequence.start()
Index: test/keystrokes/firefox/label_guess_bug_546815.py
===================================================================
--- test/keystrokes/firefox/label_guess_bug_546815.py	(revision 0)
+++ test/keystrokes/firefox/label_guess_bug_546815.py	(revision 0)
@@ -0,0 +1,224 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/python
+
+"""Test of label guess functionality, primarily by line."""
+
+from macaroon.playback import *
+import utils
+
+sequence = MacroSequence()
+
+########################################################################
+# We wait for the focus to be on a blank Firefox window.
+#
+sequence.append(WaitForWindowActivate("Minefield",None))
+
+########################################################################
+# Load the test case.
+#
+sequence.append(KeyComboAction("<Control>l"))
+sequence.append(WaitForFocus("Location", acc_role=pyatspi.ROLE_ENTRY))
+
+sequence.append(TypeAction(utils.htmlURLPrefix + "bug-546815.html"))
+sequence.append(KeyComboAction("Return"))
+
+sequence.append(WaitForDocLoad())
+
+sequence.append(WaitForFocus("",
+                             acc_role=pyatspi.ROLE_DOCUMENT_FRAME))
+
+########################################################################
+# Press Control+Home to move to the top.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyComboAction("<Control>Home"))
+sequence.append(utils.AssertPresentationAction(
+    "Top of file",
+    ["BRAILLE LINE:  'Separator'",
+     "     VISIBLE:  'Separator', cursor=1",
+     "SPEECH OUTPUT: 'separator'"]))
+
+########################################################################
+# Press Insert+Tab to move from form field to form field.
+#
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'Enter your Name:  $l text field using default type=text'",
+     "     VISIBLE:  ' $l text field using default typ', cursor=1",
+     "SPEECH OUTPUT: 'Enter your Name: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '1. Enter your Address:  $l text field using SIZE and MAXLENGTH'",
+     "     VISIBLE:  ' $l text field using SIZE and MA', cursor=1",
+     "SPEECH OUTPUT: '1. Enter your Address: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  '2. Enter your City:  $l 3. Enter your State:  $l 4. Enter your Country: US $l text field using value'",
+     "     VISIBLE:  ' $l 3. Enter your State:  $l 4. ', cursor=1",
+     "SPEECH OUTPUT: '2. Enter your City: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '2. Enter your City:  $l 3. Enter your State:  $l 4. Enter your Country: US $l text field using value'",
+     "     VISIBLE:  ' $l 4. Enter your Country: US $l', cursor=1",
+     "SPEECH OUTPUT: '3. Enter your State: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '2. Enter your City:  $l 3. Enter your State:  $l 4. Enter your Country: US $l text field using value'",
+     "     VISIBLE:  'US $l text field using value', cursor=1",
+     "SPEECH OUTPUT: '4. Enter your Country: text US'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '5. Enter your Zip:  $l'",
+     "     VISIBLE:  '5. Enter your Zip:  $l', cursor=20",
+     "SPEECH OUTPUT: '5. Enter your Zip: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field",
+    ["BRAILLE LINE:  '6. What happens when a fixed-width font(the default) is used for a one-byte text input area, let's try it.. Enter one character:  $l'",
+     "     VISIBLE:  ' $l', cursor=1",
+     "SPEECH OUTPUT: '6. What happens when a fixed-width font(the default) is used for a one-byte text input area, let's try it.. Enter one character: text'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '< > CheckBox bird'",
+     "     VISIBLE:  '< > CheckBox bird', cursor=1",
+     "SPEECH OUTPUT: 'bird check box not checked'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '< > CheckBox fish'",
+     "     VISIBLE:  '< > CheckBox fish', cursor=1",
+     "SPEECH OUTPUT: 'fish check box not checked'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '< > CheckBox wild animal'",
+     "     VISIBLE:  '< > CheckBox wild animal', cursor=1",
+     "SPEECH OUTPUT: 'wild animal check box not checked'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '&=y RadioButton cabernet sauvignon'",
+     "     VISIBLE:  '&=y RadioButton cabernet sauvign', cursor=1",
+     "SPEECH OUTPUT: 'cabernet sauvignon selected radio button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '& y RadioButton merlot'",
+     "     VISIBLE:  '& y RadioButton merlot', cursor=1",
+     "SPEECH OUTPUT: 'merlot not selected radio button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '& y RadioButton nebbiolo'",
+     "     VISIBLE:  '& y RadioButton nebbiolo', cursor=1",
+     "SPEECH OUTPUT: 'nebbiolo not selected radio button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '& y RadioButton pinot noir'",
+     "     VISIBLE:  '& y RadioButton pinot noir', cursor=1",
+     "SPEECH OUTPUT: 'pinot noir not selected radio button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  '& y RadioButton don't drink wine'",
+     "     VISIBLE:  '& y RadioButton don't drink wine', cursor=1",
+     "SPEECH OUTPUT: 'don't drink wine not selected radio button'"]))
+
+sequence.append(utils.StartRecordingAction())
+sequence.append(KeyPressAction(0, None, "KP_Insert"))
+sequence.append(KeyComboAction("Tab"))
+sequence.append(KeyReleaseAction(0, None, "KP_Insert"))
+sequence.append(utils.AssertPresentationAction(
+    "Next form field", 
+    ["BRAILLE LINE:  'Enter your Name:  $l text field using default type=text'",
+     "     VISIBLE:  ' $l text field using default typ', cursor=1",
+     "SPEECH OUTPUT: 'Wrapping to top.'",
+     "SPEECH OUTPUT: 'Enter your Name: text'"]))
+
+########################################################################
+# Move to the location bar by pressing Control+L.  When it has focus
+# type "about:blank" and press Return to restore the browser to the
+# conditions at the test's start.
+#
+sequence.append(KeyComboAction("<Control>l"))
+sequence.append(WaitForFocus("Location", acc_role=pyatspi.ROLE_ENTRY))
+
+sequence.append(TypeAction("about:blank"))
+sequence.append(KeyComboAction("Return"))
+
+sequence.append(WaitForDocLoad())
+
+# Just a little extra wait to let some events get through.
+#
+sequence.append(PauseAction(3000))
+
+sequence.append(utils.AssertionSummaryAction())
+
+sequence.start()
Index: src/orca/scripts/toolkits/Gecko/script.py
===================================================================
--- src/orca/scripts/toolkits/Gecko/script.py	(revision 4207)
+++ src/orca/scripts/toolkits/Gecko/script.py	(working copy)
@@ -1922,7 +1922,8 @@
             #
             if candidate.getRole() in [pyatspi.ROLE_LIST,
                                        pyatspi.ROLE_COMBO_BOX] \
-               and candidate.getState().contains(pyatspi.STATE_FOCUSABLE):
+               and candidate.getState().contains(pyatspi.STATE_FOCUSABLE) \
+               and not self.isSameObject(obj, candidate):
                 start = self.getCharacterOffsetInParent(candidate)
                 end = start + 1
                 candidate = candidate.parent
@@ -3703,30 +3704,30 @@
         #
         # Reverse this order for radio buttons and check boxes
         #
-        guess = None
-        extents = obj.queryComponent().getExtents(0)
-        objExtents = [extents.x, extents.y, extents.width, extents.height]
-
         lineContents = self.currentLineContents
         ourIndex = self.findObjectOnLine(obj, 0, lineContents)
         if ourIndex < 0:
             lineContents = self.getLineContentsAtOffset(obj, 0)
             ourIndex = self.findObjectOnLine(obj, 0, lineContents)
 
-        objectsOnLine = []
-        for content in lineContents:
-            objectsOnLine.append(content[0])
+        thisObj = lineContents[ourIndex]
+        objExtents = self.getExtents(thisObj[0], thisObj[1], thisObj[2])
 
-        # Now that we know where we are, let's see who are neighbors are
-        # and where they are.
-        #
-        onLeft = None
-        onRight = None
-        if ourIndex > 0:
-            onLeft = objectsOnLine[ourIndex - 1]
-        if 0 <= ourIndex < len(objectsOnLine) - 1:
-            onRight = objectsOnLine[ourIndex + 1]
+        leftGuess = ""
+        extents = objExtents
+        for i in range (ourIndex - 1, -1, -1):
+            candidate, start, end, string = lineContents[i]
+            if self.isFormField(candidate):
+                break
 
+            prevExtents = self.getExtents(candidate, start, end)
+            if -1 <= extents[0] - (prevExtents[0] + prevExtents[2]) < 75:
+                # The candidate might be an image with alternative text.
+                #
+                string = string or candidate.name
+                leftGuess = string + leftGuess
+                extents = prevExtents
+
         # Normally we prefer what's on the left given a choice.  Reasons
         # to prefer what's on the right include looking at a radio button
         # or a checkbox. [[[TODO - JD: Language direction should also be
@@ -3735,105 +3736,38 @@
         preferRight = obj.getRole() in [pyatspi.ROLE_CHECK_BOX,
                                         pyatspi.ROLE_RADIO_BUTTON]
 
-        # [[[TODO: JD: Nearby text that's not actually in the form may need
-        # to be ignored.  Let's try that for now and adjust based on feedback
-        # and testing.]]]
+        # Sometimes we don't want the text on the right -- at least not
+        # until we are able to present labels on the right after the
+        # object we believe they are labeling, rather than before.
         #
-        leftIsInForm = (onLeft and onLeft.getRole() == pyatspi.ROLE_FORM)
-        if not leftIsInForm:
-            leftIsInForm = self.getAncestor(onLeft,
-                                            [pyatspi.ROLE_FORM],
-                                            [pyatspi.ROLE_DOCUMENT_FRAME])
-        rightIsInForm = (onRight and onRight.getRole() == pyatspi.ROLE_FORM)
-        if not rightIsInForm:
-            rightIsInForm = self.getAncestor(onRight,
-                                             [pyatspi.ROLE_FORM],
-                                             [pyatspi.ROLE_DOCUMENT_FRAME])
-        # If it's a radio button, we'll waive the requirement of the text
-        # on the right being within the form (or rather, we'll just act as
-        # if it were even if it's not).
-        #
-        if obj.getRole() == pyatspi.ROLE_RADIO_BUTTON:
-            rightIsInForm = True
+        preventRight = obj.getRole() == pyatspi.ROLE_COMBO_BOX
 
-        # [[[TODO: Grayed out buttons don't pass the isFormField() test
-        # because they are neither focusable nor showing -- and thus
-        # something we don't want to navigate to via structural navigation.
-        # We may need to rethink our definition of isFormField().  In the
-        # meantime, let's not used grayed out buttons as labels. As an
-        # example, see the Search entry on live.gnome.org.]]]
-        #
-        if onLeft:
-            leftIsFormField = self.isFormField(onLeft) \
-                              or onLeft.getRole() == pyatspi.ROLE_PUSH_BUTTON
-        if onRight:
-            rightIsFormField = self.isFormField(onRight) \
-                               or onRight.getRole() == pyatspi.ROLE_PUSH_BUTTON
-
-        if onLeft and leftIsInForm and not leftIsFormField:
-            # We want to get the text on the left including embedded objects
-            # that are NOT form fields. If we find a form field on the left,
-            # that will be the starting point of the text we want.
-            #
-            startOffset = 0
-            endOffset = -1
-            if self.isSameObject(obj.parent, onLeft):
-                endOffset = self.getCharacterOffsetInParent(obj)
-                index = obj.getIndexInParent()
-                if index > 0:
-                    prevSibling = onLeft[index - 1]
-                    if self.isFormField(prevSibling):
-                        startOffset = \
-                                  self.getCharacterOffsetInParent(prevSibling)
-
-            guess = self.expandEOCs(onLeft, startOffset, endOffset)
-            if guess:
-                guess = guess.decode("UTF-8").strip()
-            if not guess and onLeft.getRole() == pyatspi.ROLE_IMAGE:
-                guess = onLeft.name
-
-        if (preferRight or not guess) \
-           and onRight and rightIsInForm and not rightIsFormField:
-            # The object's horizontal position plus its width tells us
-            # where the text on the right can begin.  For now, define
-            # "immediately after" as  within 50 pixels.
-            #
-            canStartAt = objExtents[0] + objExtents[2]
-            onRightExtents = onRight.queryComponent().getExtents(0)
-            onRightExtents = [onRightExtents.x, onRightExtents.y,
-                              onRightExtents.width, onRightExtents.height]
-
-            if (onRightExtents[0] - canStartAt) <= 50:
-                # We want to get the text on the right including embedded
-                # objects that are NOT form fields.  If we find a form field
-                # on the right, that will be the ending point of the text we
-                # want.  However, if we have a form field on the right and
-                # do not have a reason to prefer the text on the right, our
-                # label may be on the line above.  As an example, see the
-                # bugzilla Advanced search... Bug Changes section.
+        rightGuess = ""
+        extents = objExtents
+        if not preventRight and (preferRight or not leftGuess):
+            for i in range (ourIndex + 1, len(lineContents)):
+                candidate, start, end, string = lineContents[i]
+                # If we're looking on the right and find text, and then
+                # find another nearby form field, the text we've found
+                # might be the label for that field rather than for this
+                # one. We'll assume that for now and bail under these
+                # conditions.
                 #
-                startOffset = 0
-                endOffset = -1
-                if self.isSameObject(obj.parent, onRight):
-                    startOffset = self.getCharacterOffsetInParent(obj)
-                    index = obj.getIndexInParent()
-                    if index < onRight.childCount - 1:
-                        nextSibling = onRight[index + 1]
-                        nextRole = nextSibling.getRole()
-                        if self.isFormField(nextSibling) \
-                           or nextRole == pyatspi.ROLE_RADIO_BUTTON:
-                            endOffset = \
-                                  self.getCharacterOffsetInParent(nextSibling)
-                            if not preferRight:
-                                return None
+                if self.isFormField(candidate):
+                    if not preferRight:
+                        rightGuess = ""
+                    break
 
-                guess = self.expandEOCs(onRight, startOffset, endOffset)
-                if guess:
-                    guess = guess.decode("UTF-8").strip()
-                if not guess and onRight.getRole() == pyatspi.ROLE_IMAGE:
-                    guess = onRight.name
+                nextExtents = self.getExtents(candidate, start, end)
+                if -1 <= nextExtents[0] - (extents[0] + extents[2]) < 75:
+                    # The candidate might be an image with alternative text.
+                    #
+                    string = string or candidate.name
+                    rightGuess += string
+                    extents = nextExtents
 
-        return guess
+        guess = rightGuess or leftGuess
+        return guess.strip()
 
     def guessLabelFromOtherLines(self, obj):
         """Attempts to guess what the label of an unlabeled form control
@@ -4192,7 +4126,7 @@
             # cell.
             #
             guess = self.guessLabelFromOtherLines(obj)
-            #print "guess form other lines: ", guess
+            #print "guess from other lines: ", guess
         if not guess:
             # We've pretty much run out of options.  From Tom's overview
             # of the approach for all controls:
