forked from mirror/_s
a11y improvements on primary navigation menu toggle
This commit is contained in:
parent
34aa212143
commit
4b883e2aee
|
@ -28,7 +28,7 @@
|
|||
</div>
|
||||
|
||||
<nav id="site-navigation" class="main-navigation" role="navigation">
|
||||
<h1 class="menu-toggle"><?php _e( 'Menu', '_s' ); ?></h1>
|
||||
<button class="menu-toggle"><?php _e( 'Primary Menu', '_s' ); ?></button>
|
||||
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', '_s' ); ?></a>
|
||||
|
||||
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
if ( ! container )
|
||||
return;
|
||||
|
||||
button = container.getElementsByTagName( 'h1' )[0];
|
||||
button = container.getElementsByTagName( 'button' )[0];
|
||||
if ( 'undefined' === typeof button )
|
||||
return;
|
||||
|
||||
|
|
Reference in New Issue