diff --git a/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe-2024/functions.php b/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe-2024/functions.php index 50fc297707..3bca37026a 100644 --- a/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe-2024/functions.php +++ b/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe-2024/functions.php @@ -368,6 +368,18 @@ function inline_scripts() { '; path=path ); ?>'; } ); } + + var closeButton = document.getElementById( 'secondary-close' ); + if ( closeButton ) { + closeButton.addEventListener( 'click', function() { + document.body.classList.remove( 'responsive-show' ); + + var toggle = document.getElementById( 'secondary-toggle' ); + if ( toggle ) { + toggle.focus(); + } + } ); + }