diff options
-rw-r--r-- | includes/form.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/form.inc b/includes/form.inc index 65ea10f46..007cc9f90 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -1548,7 +1548,7 @@ function theme_radio($element) { $output .= (check_plain($element['#value']) == $element['#return_value']) ? ' checked="checked" ' : ' '; $output .= drupal_attributes($element['#attributes']) . ' />'; if (!is_null($element['#title'])) { - $output = '<label class="option">' . $output . ' ' . $element['#title'] . '</label>'; + $output = '<label class="option" for="' . $element['#id'] . '">' . $output . ' ' . $element['#title'] . '</label>'; } unset($element['#title']); @@ -1976,7 +1976,7 @@ function theme_checkbox($element) { $checkbox .= drupal_attributes($element['#attributes']) . ' />'; if (!is_null($element['#title'])) { - $checkbox = '<label class="option">' . $checkbox . ' ' . $element['#title'] . '</label>'; + $checkbox = '<label class="option" for="' . $element['#id'] . '">' . $checkbox . ' ' . $element['#title'] . '</label>'; } unset($element['#title']); |