diff options
-rw-r--r-- | includes/theme.inc | 7 | ||||
-rw-r--r-- | themes/garland/template.php | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 352706eff..c908088ff 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1509,7 +1509,12 @@ function theme_image($path, $alt = '', $title = '', $attributes = array(), $gets */ function theme_breadcrumb($breadcrumb) { if (!empty($breadcrumb)) { - return '<div class="breadcrumb">' . implode(' » ', $breadcrumb) . '</div>'; + // Provide a navigational heading to give context for breadcrumb links to + // screen-reader users. Make the heading invisible with .element-invisible. + $output = '<h2 class="element-invisible">' . t('You are here') . '</h2>'; + + $output .= '<div class="breadcrumb">' . implode(' » ', $breadcrumb) . '</div>'; + return $output; } } diff --git a/themes/garland/template.php b/themes/garland/template.php index 9b92aa7b2..70a415ffa 100644 --- a/themes/garland/template.php +++ b/themes/garland/template.php @@ -10,7 +10,12 @@ */ function garland_breadcrumb($breadcrumb) { if (!empty($breadcrumb)) { - return '<div class="breadcrumb">' . implode(' › ', $breadcrumb) . '</div>'; + // Provide a navigational heading to give context for breadcrumb links to + // screen-reader users. Make the heading invisible with .element-invisible. + $output = '<h2 class="element-invisible">' . t('You are here') . '</h2>'; + + $output .= '<div class="breadcrumb">' . implode(' › ', $breadcrumb) . '</div>'; + return $output; } } |