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/link-template.php

    r51285 r51967  
    29002900
    29012901    $template = '
    2902     <nav class="navigation %1$s" role="navigation" aria-label="%4$s">
     2902    <nav class="navigation %1$s" aria-label="%4$s">
    29032903        <h2 class="screen-reader-text">%2$s</h2>
    29042904        <div class="nav-links">%3$s</div>
     
    29122912     * links (%3$s), and ARIA label text if screen-reader-text does not fit that (%4$s):
    29132913     *
    2914      *     <nav class="navigation %1$s" role="navigation" aria-label="%4$s">
     2914     *     <nav class="navigation %1$s" aria-label="%4$s">
    29152915     *         <h2 class="screen-reader-text">%2$s</h2>
    29162916     *         <div class="nav-links">%3$s</div>
Note: See TracChangeset for help on using the changeset viewer.