diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-20 15:18:09 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-20 15:18:09 +0000 |
commit | 1aee5cf42d17c2de4af7024ec8b364b7680eed8f (patch) | |
tree | 97dae1d50f6edc373c396af16bbfa1bf89fac352 /includes | |
parent | e00f620dbc598be62b1a2aa7b84afec3f3863107 (diff) | |
download | brdo-1aee5cf42d17c2de4af7024ec8b364b7680eed8f.tar.gz brdo-1aee5cf42d17c2de4af7024ec8b364b7680eed8f.tar.bz2 |
#515236 by brandonojc, Everett Zufelt, and zzolo: Added additional markup to theme_status_messages() to be more apparent to assistive technology users.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/theme.inc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 2ab8721a7..50c78987b 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1338,6 +1338,9 @@ function theme_placeholder($text) { * Return a themed set of status and/or error messages. The messages are grouped * by type. * + * An invisible heading identifies the messages for assistive technology. Sighted + * users see a colored box. See http://www.w3.org/TR/WCAG-TECHS/H69.html for info. + * * @param $display * (optional) Set to 'status' or 'error' to display only messages of that type. * @@ -1346,8 +1349,16 @@ function theme_placeholder($text) { */ function theme_status_messages($display = NULL) { $output = ''; + $status_heading = array( + 'status' => t('Status message'), + 'error' => t('Error message'), + 'warning' => t('Warning message'), + ); foreach (drupal_get_messages($display) as $type => $messages) { $output .= "<div class=\"messages $type\">\n"; + if (!empty($status_heading[$type])) { + $output .= '<h2 class="element-invisible">' . $status_heading[$type] . "</h2>\n"; + } if (count($messages) > 1) { $output .= " <ul>\n"; foreach ($messages as $message) { |