mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-09 18:08:09 +01:00
a3a61c5a3e
Role="navigation" was required for assistive technology to recognize HTML5 element's native ARIA roles while HTML5 and ARIA were being introduced. With the deprecation of IE11, the role attribute is only required when mapping elements that don't have native role. Props costdev, mukesh27. Fixes #54054. Built from https://develop.svn.wordpress.org/trunk@51967 git-svn-id: http://core.svn.wordpress.org/trunk@51556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
34 lines
1021 B
PHP
34 lines
1021 B
PHP
<?php
|
|
/**
|
|
* Displays top navigation
|
|
*
|
|
* @package WordPress
|
|
* @subpackage Twenty_Seventeen
|
|
* @since Twenty Seventeen 1.0
|
|
* @version 1.2
|
|
*/
|
|
|
|
?>
|
|
<nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Top Menu', 'twentyseventeen' ); ?>">
|
|
<button class="menu-toggle" aria-controls="top-menu" aria-expanded="false">
|
|
<?php
|
|
echo twentyseventeen_get_svg( array( 'icon' => 'bars' ) );
|
|
echo twentyseventeen_get_svg( array( 'icon' => 'close' ) );
|
|
_e( 'Menu', 'twentyseventeen' );
|
|
?>
|
|
</button>
|
|
|
|
<?php
|
|
wp_nav_menu(
|
|
array(
|
|
'theme_location' => 'top',
|
|
'menu_id' => 'top-menu',
|
|
)
|
|
);
|
|
?>
|
|
|
|
<?php if ( ( twentyseventeen_is_frontpage() || ( is_home() && is_front_page() ) ) && has_custom_header() ) : ?>
|
|
<a href="#content" class="menu-scroll-down"><?php echo twentyseventeen_get_svg( array( 'icon' => 'arrow-right' ) ); ?><span class="screen-reader-text"><?php _e( 'Scroll down to content', 'twentyseventeen' ); ?></span></a>
|
|
<?php endif; ?>
|
|
</nav><!-- #site-navigation -->
|