- Patch #526674 by Everett Zufelt, mgifford: made breadcrumbs more accessible for visually impaired people.

merge-requests/26/head
Dries Buytaert 2009-09-11 14:14:16 +00:00
parent 92113cc409
commit 28a9529524
2 changed files with 12 additions and 2 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}