From f509400f6ee08d60632b99a2fe38bc52497a7071 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Fri, 6 Nov 2026 00:00:31 -0600 Subject: [PATCH 1/4] Make: Use a plain button to close the mobile sidebar The sidebar's close control was a button nested inside an empty link that reused the `secondary-toggle` ID of the Menu link, so pages had two elements with the same ID and an interactive element inside another. Accessibility checkers flag both. Replace it with a single button that has its own ID and a translatable label, close the panel from the theme's footer script, and carry over the link's mobile layout so the button renders where it did before. Fixes #8061. Co-Authored-By: Claude Opus 5.5 --- .../pub/wporg-breathe-2024/functions.php | 7 ++++++ .../wporg-breathe-2024/sidebar-handbook.php | 2 +- .../themes/pub/wporg-breathe-2024/sidebar.php | 2 +- .../themes/pub/wporg-breathe-2024/style.css | 23 ++++++++++++++++++- 4 files changed, 31 insertions(+), 3 deletions(-) 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..f04c27aa29 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,13 @@ function inline_scripts() { '; path=path ); ?>'; } ); } + + var closeButton = document.getElementById( 'secondary-close' ); + if ( closeButton ) { + closeButton.addEventListener( 'click', function() { + document.body.classList.remove( 'responsive-show' ); + } ); + }