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	18 Aug 2009 03:10:40 -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.
  *
@@ -1239,6 +1242,7 @@ function theme_status_messages($display 
   $output = '';
   foreach (drupal_get_messages($display) as $type => $messages) {
     $output .= "<div class=\"messages $type\">\n";
+    $output .= '<h2 class="element-invisible">' . t('!status messages', array('!status' => $type)) . "</h2>\n";
     if (count($messages) > 1) {
       $output .= " <ul>\n";
       foreach ($messages as $message) {
