diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-01-18 06:51:41 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-01-18 06:51:41 +0000 |
commit | af81911cb75b759bcfb298b3a9dfe073e2ef2228 (patch) | |
tree | 4b02ceeb71681c16617c05b89e29c0a440833c10 | |
parent | 6135b967e1ea9cbd97fda7523f0b0344eff68e58 (diff) | |
download | brdo-af81911cb75b759bcfb298b3a9dfe073e2ef2228.tar.gz brdo-af81911cb75b759bcfb298b3a9dfe073e2ef2228.tar.bz2 |
#152098 by mgifford: Improve accessibility of radios and checkboxes.
-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']); |