diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-08-22 13:45:37 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-08-22 13:45:37 +0000 |
commit | 73a72337bb4c296211c5cb728b027ad0fefa85ed (patch) | |
tree | 6048bede0556418a8cfa72f03d75e575da9612ac | |
parent | 0ac8abb27f52669e1375fea2e11389e58315bb61 (diff) | |
download | brdo-73a72337bb4c296211c5cb728b027ad0fefa85ed.tar.gz brdo-73a72337bb4c296211c5cb728b027ad0fefa85ed.tar.bz2 |
- Patch #364219 by Everett Zufelt, brandonojc, jmburnz, mgifford: for accessibility, navigation menus should be preceded by headings of the appropriate level.
-rw-r--r-- | modules/system/page.tpl.php | 4 | ||||
-rw-r--r-- | themes/garland/template.php | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/modules/system/page.tpl.php b/modules/system/page.tpl.php index 7b4cc420e..ef8cfdf4a 100644 --- a/modules/system/page.tpl.php +++ b/modules/system/page.tpl.php @@ -154,7 +154,7 @@ <?php if ($main_menu): ?> <div id="navigation"><div class="section"> - <?php print theme('links', $main_menu, array('id' => 'main-menu', 'class' => 'links clearfix')); ?> + <?php print theme('links', $main_menu, array('text' => t('Main menu'), 'level' => 'h2'), array('id' => 'main-menu', 'class' => 'links clearfix')); ?> </div></div> <!-- /.section, /#navigation --> <?php endif; ?> @@ -192,7 +192,7 @@ </div></div> <!-- /#main, /#main-wrapper --> <div id="footer"><div class="section"> - <?php print theme('links', $secondary_menu, array('id' => 'secondary-menu', 'class' => 'links clearfix')); ?> + <?php print theme('links', $secondary_menu, array('text' => t('Secondary menu'), 'level' => 'h2'), array('id' => 'secondary-menu', 'class' => 'links clearfix')); ?> <?php if ($footer): ?><div id="footer-region" class="region"><?php print $footer; ?></div><?php endif; ?> </div></div> <!-- /.section, /#footer --> diff --git a/themes/garland/template.php b/themes/garland/template.php index c83a80694..7a58dfdb0 100644 --- a/themes/garland/template.php +++ b/themes/garland/template.php @@ -19,8 +19,12 @@ function garland_breadcrumb($breadcrumb) { */ function garland_preprocess_page(&$vars) { $vars['tabs2'] = menu_secondary_local_tasks(); - $vars['primary_nav'] = isset($vars['main_menu']) ? theme('links', $vars['main_menu'], array('class' => 'links main-menu')) : FALSE; - $vars['secondary_nav'] = isset($vars['secondary_menu']) ? theme('links', $vars['secondary_menu'], array('class' => 'links secondary-menu')) : FALSE; + $vars['primary_nav'] = isset($vars['main_menu']) ? theme('links', $vars['main_menu'], array( + 'text' => t('Main menu'), 'level' => 'h2', 'class' => 'element-invisible', + ), array('class' => 'links main-menu')) : FALSE; + $vars['secondary_nav'] = isset($vars['secondary_menu']) ? theme('links', $vars['secondary_menu'], array( + 'text' => t('Secondary menu'), 'level' => 'h2', 'class' => 'element-invisible', + ), array('class' => 'links secondary-menu')) : FALSE; $vars['ie_styles'] = garland_get_ie_styles(); // Prepare header |