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/footer.php

    r45604 r51967  
    1515        <footer id="colophon" class="site-footer" role="contentinfo">
    1616            <?php if ( has_nav_menu( 'primary' ) ) : ?>
    17                 <nav class="main-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Footer Primary Menu', 'twentysixteen' ); ?>">
     17                <nav class="main-navigation" aria-label="<?php esc_attr_e( 'Footer Primary Menu', 'twentysixteen' ); ?>">
    1818                    <?php
    1919                        wp_nav_menu(
     
    2828
    2929            <?php if ( has_nav_menu( 'social' ) ) : ?>
    30                 <nav class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Footer Social Links Menu', 'twentysixteen' ); ?>">
     30                <nav class="social-navigation" aria-label="<?php esc_attr_e( 'Footer Social Links Menu', 'twentysixteen' ); ?>">
    3131                    <?php
    3232                        wp_nav_menu(
Note: See TracChangeset for help on using the changeset viewer.