Commit 28a95295 authored by Dries's avatar Dries

- Patch #526674 by Everett Zufelt, mgifford: made breadcrumbs more accessible...

- Patch #526674 by Everett Zufelt, mgifford: made breadcrumbs more accessible for visually impaired people.
parent 92113cc4
...@@ -1509,7 +1509,12 @@ function theme_image($path, $alt = '', $title = '', $attributes = array(), $gets ...@@ -1509,7 +1509,12 @@ function theme_image($path, $alt = '', $title = '', $attributes = array(), $gets
*/ */
function theme_breadcrumb($breadcrumb) { function theme_breadcrumb($breadcrumb) {
if (!empty($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;
} }
} }
......
...@@ -10,7 +10,12 @@ ...@@ -10,7 +10,12 @@
*/ */
function garland_breadcrumb($breadcrumb) { function garland_breadcrumb($breadcrumb) {
if (!empty($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;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment