Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.445
diff -u -p -r1.445 form.inc
--- includes/form.inc	26 Mar 2010 18:58:12 -0000	1.445
+++ includes/form.inc	29 Mar 2010 01:25:16 -0000
@@ -2972,6 +2972,9 @@ function theme_file($variables) {
  *   for radio and checkbox #type elements as set in system_element_info().
  *   If the #title is empty but the field is #required, the label will
  *   contain only the required marker.
+ * - invisible: Labels are critical for screen readers to enable them to
+ *   properly navigate through forms but can be visually distracting. This
+ *   property hides the label for everyone except screen readers.
  * - attribute: Set the title attribute on the element to create a tooltip
  *   but output no label element. This is supported only for checkboxes
  *   and radios in form_pre_render_conditional_form_element(). It is used
@@ -3028,6 +3031,7 @@ function theme_form_element($variables) 
       $output .= ' ' . $element['#children'] . "\n";
       break;
 
+    case 'invisible':
     case 'after':
       $output .= ' ' . $element['#children'];
       $output .= ' ' . theme('form_element_label', $variables) . "\n";
@@ -3114,10 +3118,15 @@ function theme_form_element_label($varia
   $title = filter_xss_admin($element['#title']);
 
   $attributes = array();
+  // Style the label as class option to display inline with the element.
   if ($element['#title_display'] == 'after') {
-    // Style the label as class option to display inline with the element.
     $attributes['class'] = 'option';
   }
+  // Show label only to screen readers to avoid disruption in visual flows.
+  elseif ($element['#title_display'] == 'invisible') {
+    $attributes['class'] = 'element-invisible';
+  }
+
   if (!empty($element['#id'])) {
     $attributes['for'] = $element['#id'];
   }
Index: modules/simpletest/tests/form.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/form.test,v
retrieving revision 1.43
diff -u -p -r1.43 form.test
--- modules/simpletest/tests/form.test	27 Mar 2010 05:52:50 -0000	1.43
+++ modules/simpletest/tests/form.test	29 Mar 2010 01:25:16 -0000
@@ -305,6 +305,9 @@ class FormsElementsLabelsTestCase extend
     $elements = $this->xpath('//input[@id="edit-form-textfield-test-title-after"]/following-sibling::label[@for="edit-form-textfield-test-title-after" and @class="option"]');
     $this->assertTrue(isset($elements[0]), t("Label after field and label option class correct for text field."));
 
+    $elements = $this->xpath('//input[@id="edit-form-textfield-test-title-invisible"]/following-sibling::label[@for="edit-form-textfield-test-title-invisible" and @class="element-invisible"]');
+    $this->assertTrue(isset($elements[0]), t("Label after field and label class is element-invisible."));
+
     $elements = $this->xpath('//label[@for="edit-form-textfield-test-title-no-show"]');
     $this->assertFalse(isset($elements[0]), t("No label tag when title set not to display."));
   }
Index: modules/simpletest/tests/form_test.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/form_test.module,v
retrieving revision 1.33
diff -u -p -r1.33 form_test.module
--- modules/simpletest/tests/form_test.module	26 Mar 2010 18:58:12 -0000	1.33
+++ modules/simpletest/tests/form_test.module	29 Mar 2010 01:25:16 -0000
@@ -544,6 +544,11 @@ function form_label_test_form(&$form_sta
     '#title' => t('Textfield test for title after element'),
     '#title_display' => 'after',
   );
+  $form['form_textfield_test_title_invisible'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Textfield test for invisible title'),
+    '#title_display' => 'invisible',
+  );
   // Textfield test for title set not to display
   $form['form_textfield_test_title_no_show'] = array(
     '#type' => 'textfield',
