Make WordPress Core


Ignore:
Timestamp:
11/01/2021 09:45:45 PM (3 years ago)
Author:
joedolson
Message:

General: Remove role="navigation" from nav elements.

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentysixteen/header.php

    r51541 r51967  
    5252                    <div id="site-header-menu" class="site-header-menu">
    5353                        <?php if ( has_nav_menu( 'primary' ) ) : ?>
    54                             <nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Primary Menu', 'twentysixteen' ); ?>">
     54                            <nav id="site-navigation" class="main-navigation" aria-label="<?php esc_attr_e( 'Primary Menu', 'twentysixteen' ); ?>">
    5555                                <?php
    5656                                    wp_nav_menu(
     
    6565
    6666                        <?php if ( has_nav_menu( 'social' ) ) : ?>
    67                             <nav id="social-navigation" class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'twentysixteen' ); ?>">
     67                            <nav id="social-navigation" class="social-navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'twentysixteen' ); ?>">
    6868                                <?php
    6969                                    wp_nav_menu(
Note: See TracChangeset for help on using the changeset viewer.