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/twentytwelve/functions.php

    r51033 r51967  
    395395
    396396        if ( $wp_query->max_num_pages > 1 ) : ?>
    397             <nav id="<?php echo esc_attr( $html_id ); ?>" class="navigation" role="navigation">
     397            <nav id="<?php echo esc_attr( $html_id ); ?>" class="navigation">
    398398                <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>
    399399                <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentytwelve' ) ); ?></div>
Note: See TracChangeset for help on using the changeset viewer.