summaryrefslogtreecommitdiff
path: root/modules/locale
diff options
context:
space:
mode:
authorwebchick <webchick@24967.no-reply.drupal.org>2011-06-26 22:51:07 -0700
committerwebchick <webchick@24967.no-reply.drupal.org>2011-06-26 22:51:07 -0700
commite847ee243adc70bc47389eb38eea7fecec5ea685 (patch)
treeec1c9d866a6afe22d5a481c5094921f1682c1867 /modules/locale
parent9de419ad677111fb7e13b1cc1959fd959308f485 (diff)
downloadbrdo-e847ee243adc70bc47389eb38eea7fecec5ea685.tar.gz
brdo-e847ee243adc70bc47389eb38eea7fecec5ea685.tar.bz2
Issue #885616 by mgifford, Everett Zufelt: Fixed Labels missing from a number of locale admin forms.
Diffstat (limited to 'modules/locale')
-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]),