From 830d3942a0dd5fb0a828344da5473d7b8c2b36db Mon Sep 17 00:00:00 2001 From: joedolson Date: Wed, 27 Jan 2021 21:32:58 +0000 Subject: [PATCH] Twenty Twenty: Remove aria-expanded on search modal close button. The Twenty Twenty search modal uses aria-expanded correctly on the Search button, but toggles the aria-expanded value on the 'close' button. The close button is a different control, however, so the attribute value toggling is uneven. The close button does not toggle any behavior; it only closes a control that has already been opened. Props alexstine, audrasjb Fixes #52355 Built from https://develop.svn.wordpress.org/trunk@50033 git-svn-id: http://core.svn.wordpress.org/trunk@49734 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentytwenty/assets/js/index.js | 3 +++ wp-content/themes/twentytwenty/template-parts/modal-search.php | 2 +- wp-includes/version.php | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/twentytwenty/assets/js/index.js b/wp-content/themes/twentytwenty/assets/js/index.js index 5b2a9b2278..84875ef42e 100644 --- a/wp-content/themes/twentytwenty/assets/js/index.js +++ b/wp-content/themes/twentytwenty/assets/js/index.js @@ -676,6 +676,9 @@ twentytwentyDomReady( function() { /* Toggle an attribute ----------------------- */ function twentytwentyToggleAttribute( element, attribute, trueVal, falseVal ) { + if ( element.classList.contains( 'close-search-toggle' ) ) { + return; + } if ( trueVal === undefined ) { trueVal = true; } diff --git a/wp-content/themes/twentytwenty/template-parts/modal-search.php b/wp-content/themes/twentytwenty/template-parts/modal-search.php index f0b51bdbbc..56e0b57366 100644 --- a/wp-content/themes/twentytwenty/template-parts/modal-search.php +++ b/wp-content/themes/twentytwenty/template-parts/modal-search.php @@ -22,7 +22,7 @@ ); ?> - diff --git a/wp-includes/version.php b/wp-includes/version.php index c3b4da0f53..44530b1487 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-alpha-50032'; +$wp_version = '5.7-alpha-50033'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.