diff --git a/_layouts/default.html b/_layouts/default.html index f15759266..23c09cef7 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -43,6 +43,6 @@ -
+
diff --git a/assets/js/wp-a11y-docs.js b/assets/js/wp-a11y-docs.js index 2568b641a..bcdfcd63b 100644 --- a/assets/js/wp-a11y-docs.js +++ b/assets/js/wp-a11y-docs.js @@ -2,7 +2,7 @@ layout: null --- -(function (jtd, undefined) { + (function (jtd, undefined) { // // --------------------------------------------------------- @@ -497,15 +497,12 @@ /** * Scrolls sidebar navigation so the active link is centered. * - * Also removes the link's `href` to prevent accidental reloads. - * * @function scrollNav */ function scrollNav() { const targetLink = navLink(); if (targetLink) { targetLink.scrollIntoView({ block: "center" }); - targetLink.removeAttribute('href'); } } @@ -530,6 +527,7 @@ } if (target) { target.classList.add('active'); + target.classList.toggle('active', true); target = target.parentNode; } } @@ -600,17 +598,17 @@ jtd.onReady(function() { const input = query; if (!resultsContainer) return; - + // Handle empty search query if (!query) { // Check if there was a q parameter but it was empty if (urlParams.has("q")) { let pageTitle = document.querySelector('title'); let h1 = document.querySelector('h1'); - + if (pageTitle) pageTitle.innerText = 'Empty Search Query - No Results'; if (h1) h1.innerText = 'No Search Term Entered'; - + resultsContainer.innerHTML = '

Please enter a search term to find relevant content.

'; } return;