Commit 73a72337 authored by Dries's avatar Dries

- Patch #364219 by Everett Zufelt, brandonojc, jmburnz, mgifford: for...

- Patch #364219 by Everett Zufelt, brandonojc, jmburnz, mgifford: for accessibility, navigation menus should be preceded by headings of the appropriate level.
parent 0ac8abb2
......@@ -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 -->
......
......@@ -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
......
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