summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-09-11 14:14:16 +0000
committerDries Buytaert <dries@buytaert.net>2009-09-11 14:14:16 +0000
commit28a9529524da705aee4fc761939123e846a32bdb (patch)
treed31d79cbb37d3aa18f71fd42c96908293d818cf0
parent92113cc4094e15f558df3601d4253cff48dba7ee (diff)
downloadbrdo-28a9529524da705aee4fc761939123e846a32bdb.tar.gz
brdo-28a9529524da705aee4fc761939123e846a32bdb.tar.bz2
- Patch #526674 by Everett Zufelt, mgifford: made breadcrumbs more accessible for visually impaired people.
-rw-r--r--includes/theme.inc7
-rw-r--r--themes/garland/template.php7
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;
}
}