Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drupal core outputs menus like this:
<div id="main-menu" class="navigation"> <h2>Main Menu Title</h2> <ul id="main-menu-links" class="links clearfix"> <li>Link 1</li> <li>Link 2</li> </ul> </div>
We want instead to be:
<nav id="main-menu"> <h2>Main Menu Title</h2> <ul id="main-menu-links" class="links clearfix"> <li>Link 1</li> <li>Link 2</li> </ul> </div>
Only we should talk about the id and classes on <ul>
. And about whether the title should be <h1>
or <h2>
.
Comments
Comment #1
amateescu CreditAttribution: amateescu commentedThis should be discussed at the theme level.
Comment #2
JohnAlbintheme_links() only outputs the H2 and the UL. The
<div id="navigation"><div class="section">
comes from the page.tpl.php. Pretty straight-forward change on the theme.Comment #3
amateescu CreditAttribution: amateescu commentedAlready done in http://drupalcode.org/project/html5_base.git/blobdiff/6ee1b9bc42116b2be2...