summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/locale/locale.admin.inc12
1 files changed, 11 insertions, 1 deletions
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(
- '<strong>' . drupal_render($form['name'][$key]) . '</strong>',
+ '<strong>' . $title . '</strong>',
drupal_render($form['native'][$key]),
check_plain($key),
drupal_render($form['direction'][$key]),