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.
Built from https://develop.svn.wordpress.org/trunk@45596


git-svn-id: http://core.svn.wordpress.org/trunk@45407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-07-04 09:23:55 +00:00
parent d1815a5c91
commit abe3ec288b
2 changed files with 4 additions and 4 deletions

View File

@ -206,12 +206,12 @@ function twentynineteen_add_ellipses_to_nav( $nav_menu, $args ) {
<div class="main-menu-more"> <div class="main-menu-more">
<ul class="main-menu"> <ul class="main-menu">
<li class="menu-item menu-item-has-children"> <li class="menu-item menu-item-has-children">
<button class="submenu-expand main-menu-more-toggle is-empty" tabindex="-1" aria-label="More" aria-haspopup="true" aria-expanded="false"> <button class="submenu-expand main-menu-more-toggle is-empty" tabindex="-1"
<span class="screen-reader-text">' . esc_html__( 'More', 'twentynineteen' ) . '</span>' . aria-label="' . esc_attr__( 'More', 'twentynineteen' ) . '" aria-haspopup="true" aria-expanded="false">' .
twentynineteen_get_icon_svg( 'arrow_drop_down_ellipsis' ) . ' twentynineteen_get_icon_svg( 'arrow_drop_down_ellipsis' ) . '
</button> </button>
<ul class="sub-menu hidden-links"> <ul class="sub-menu hidden-links">
<li id="menu-item--1" class="mobile-parent-nav-menu-item menu-item--1"> <li class="mobile-parent-nav-menu-item">
<button class="menu-item-link-return">' . <button class="menu-item-link-return">' .
twentynineteen_get_icon_svg( 'chevron_left' ) . twentynineteen_get_icon_svg( 'chevron_left' ) .
esc_html__( 'Back', 'twentynineteen' ) . ' esc_html__( 'Back', 'twentynineteen' ) . '

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.3-alpha-45595'; $wp_version = '5.3-alpha-45596';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.