Merge pull request #1063 from IanDelMar/header-aria-label

Add aria-label to <nav>
This commit is contained in:
UnderstrapFramework 2019-12-13 11:11:48 +00:00 committed by GitHub
commit 7f9412557d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -30,7 +30,11 @@ $container = get_theme_mod( 'understrap_container_type' );
<a class="skip-link sr-only sr-only-focusable" href="#content"><?php esc_html_e( 'Skip to content', 'understrap' ); ?></a> <a class="skip-link sr-only sr-only-focusable" href="#content"><?php esc_html_e( 'Skip to content', 'understrap' ); ?></a>
<nav id="main-nav" class="navbar navbar-expand-md navbar-dark bg-primary"> <nav id="main-nav" class="navbar navbar-expand-md navbar-dark bg-primary" aria-labelledby="main-nav-label">
<h2 id="main-nav-label" class="sr-only">
<?php esc_html_e( 'Main Navigation', 'understrap' ); ?>
</h2>
<?php if ( 'container' === $container ) : ?> <?php if ( 'container' === $container ) : ?>
<div class="container"> <div class="container">