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-includes/widgets/class-wp-widget-tag-cloud.php

    r51850 r51967  
    103103            $title      = trim( strip_tags( $title ) );
    104104            $aria_label = $title ? $title : $default_title;
    105             echo '<nav role="navigation" aria-label="' . esc_attr( $aria_label ) . '">';
     105            echo '<nav aria-label="' . esc_attr( $aria_label ) . '">';
    106106        }
    107107
Note: See TracChangeset for help on using the changeset viewer.