From e847ee243adc70bc47389eb38eea7fecec5ea685 Mon Sep 17 00:00:00 2001 From: webchick Date: Sun, 26 Jun 2011 22:51:07 -0700 Subject: Issue #885616 by mgifford, Everett Zufelt: Fixed Labels missing from a number of locale admin forms. --- modules/locale/locale.admin.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/locale/locale.admin.inc b/modules/locale/locale.admin.inc index d8201dbf2..01cee134d 100644 --- a/modules/locale/locale.admin.inc +++ b/modules/locale/locale.admin.inc @@ -80,9 +80,19 @@ function theme_locale_languages_overview_form($variables) { if ($key == $default->language) { $form['enabled'][$key]['#attributes']['disabled'] = 'disabled'; } + + // Add invisible labels for the checkboxes and radio buttons in the table + // for accessibility. These changes are only required and valid when the + // form is themed as a table, so it would be wrong to perform them in the + // form constructor. + $title = drupal_render($form['name'][$key]); + $form['enabled'][$key]['#title'] = t('Enable !title', array('!title' => $title)); + $form['enabled'][$key]['#title_display'] = 'invisible'; + $form['site_default'][$key]['#title'] = t('Set !title as default', array('!title' => $title)); + $form['site_default'][$key]['#title_display'] = 'invisible'; $rows[] = array( 'data' => array( - '' . drupal_render($form['name'][$key]) . '', + '' . $title . '', drupal_render($form['native'][$key]), check_plain($key), drupal_render($form['direction'][$key]), -- cgit v1.2.3