WordPress.org

Make WordPress Core

Changeset 45596


Ignore:
Timestamp:
07/04/2019 09:22:17 AM (17 months ago)
Author:
SergeyBiryukov
Message:

Twenty Nineteen: Fix markup errors in twentynineteen_add_ellipses_to_nav():

  • Add missing i18n for aria-label attribute.
  • Remove redundant screen reader text superseded by aria-label.
  • Remove unnecessary id and class attributes.

Props afercia, chetan200891, ianbelanger.
Fixes #47067.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentynineteen/inc/template-functions.php

    r45595 r45596  
    207207                <ul class="main-menu">
    208208                    <li class="menu-item menu-item-has-children">
    209                         <button class="submenu-expand main-menu-more-toggle is-empty" tabindex="-1" aria-label="More" aria-haspopup="true" aria-expanded="false">
    210                             <span class="screen-reader-text">' . esc_html__( 'More', 'twentynineteen' ) . '</span>' .
     209                        <button class="submenu-expand main-menu-more-toggle is-empty" tabindex="-1"
     210                            aria-label="' . esc_attr__( 'More', 'twentynineteen' ) . '" aria-haspopup="true" aria-expanded="false">' .
    211211                            twentynineteen_get_icon_svg( 'arrow_drop_down_ellipsis' ) . '
    212212                        </button>
    213213                        <ul class="sub-menu hidden-links">
    214                             <li id="menu-item--1" class="mobile-parent-nav-menu-item menu-item--1">
     214                            <li class="mobile-parent-nav-menu-item">
    215215                                <button class="menu-item-link-return">' .
    216216                                    twentynineteen_get_icon_svg( 'chevron_left' ) .
Note: See TracChangeset for help on using the changeset viewer.