Heine

  • home
  • drupal
  • drupal core commits
  • about
Home › Drupal Core Commits

Commit 261684 by dries

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

--- includes/theme.inc  2009/09/11 06:48:02     1.521
+++ includes/theme.inc  2009/09/11 14:14:16     1.522
@@ -1509,7 +1509,12 @@
  */
 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;
   }
 }
 

--- themes/garland/template.php 2009/09/01 20:39:55     1.29
+++ themes/garland/template.php 2009/09/11 14:14:16     1.30
@@ -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;
   }
 }
 

No votes yet
  • Drupal Core
  • Download patch

Recent posts

  • Bugfix woes for Drupal 6
  • Arbitrary PHP code execution in modx 1.0.0 via CSRF
  • The #drupal consultant
  • Varnish vs. page cache graph
  • FAPI - How to decrease/increase the text limit of textfields?
more

Tags

Captcha CSRF Drupal Let's hope it doesn't become popular modx Performance PHP Pitfalls Planet Drupal Security V-PowerServer Varnish
more tags
  • home
  • drupal
  • drupal core commits
  • about

Copyright © 2009 by Heine Deelstra. All rights reserved.