Index: includes/theme.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/theme.inc,v retrieving revision 1.505 diff -u -p -r1.505 theme.inc --- includes/theme.inc 17 Aug 2009 19:14:39 -0000 1.505 +++ includes/theme.inc 19 Aug 2009 17:43:04 -0000 @@ -1229,6 +1229,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. * @@ -1237,8 +1240,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 .= "
\n"; + if (!empty($status_heading[$type])) { + $output .= '

' . $status_heading[$type] . "

\n"; + } if (count($messages) > 1) { $output .= "