diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-10-20 01:31:07 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-10-20 01:31:07 +0000 |
commit | b0cbc018ec0ab568a6c9bff712a331417a3ccd8d (patch) | |
tree | 6ba0a3b5bdc3f2b61d6b18d9ba4e762edb87f098 /includes | |
parent | cb1f944383477ea46d49326887ababb8f64899dd (diff) | |
download | brdo-b0cbc018ec0ab568a6c9bff712a331417a3ccd8d.tar.gz brdo-b0cbc018ec0ab568a6c9bff712a331417a3ccd8d.tar.bz2 |
- Patch #882694 by mgifford, sun, ksenzee, bleen18, yched: add missing form element titles for accessibility.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/form.inc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/includes/form.inc b/includes/form.inc index c2c179026..89f6d5ab9 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -2658,19 +2658,24 @@ function form_process_date($element) { switch ($type) { case 'day': $options = drupal_map_assoc(range(1, 31)); + $title = t('Day'); break; case 'month': $options = drupal_map_assoc(range(1, 12), 'map_month'); + $title = t('Month'); break; case 'year': $options = drupal_map_assoc(range(1900, 2050)); + $title = t('Year'); break; } $element[$type] = array( '#type' => 'select', + '#title' => $title, + '#title_display' => 'invisible', '#value' => $element['#value'][$type], '#attributes' => $element['#attributes'], '#options' => $options, @@ -3000,9 +3005,16 @@ function form_process_tableselect($element) { // Do not overwrite manually created children. if (!isset($element[$key])) { if ($element['#multiple']) { + $title = ''; + if (!empty($element['#options'][$key]['title']['data']['#title'])) { + $title = t('Update @title', array( + '@title' => $element['#options'][$key]['title']['data']['#title'], + )); + } $element[$key] = array( '#type' => 'checkbox', - '#title' => '', + '#title' => $title, + '#title_display' => 'invisible', '#return_value' => $key, '#default_value' => isset($value[$key]) ? $key : NULL, '#attributes' => $element['#attributes'], |