Skip to content

Instantly share code, notes, and snippets.

View joe-deltaechovictor's full-sized avatar

joe-deltaechovictor

View GitHub Profile
@joe-deltaechovictor
joe-deltaechovictor / accessible-menu.php
Created March 14, 2024 15:04 — forked from SteveJonesDev/accessible-menu.php
Accessible WordPress Navigation Menu
<div class="menu-container">
<button class="menu-button" aria-expanded="false" aria-controls="site-header-menu" aria-label="<?php esc_attr_e( 'Menu', 'textdomain' ); ?>"></button>
<div id="site-header-menu" class="site-header-menu">
<?php
wp_nav_menu(
array(
'theme_location' => 'primary',
'container' => 'nav',
'container_class' => 'main-navigation',
'container_id' => 'site-navigation',