File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 4343 </ div >
4444 </ div >
4545 </ div >
46- < div id ="screen-reader-feedback " role ="status "> </ div >
46+ < div id ="screen-reader-feedback " role ="region " aria-live =" polite " aria-atomic =" true "> </ div >
4747</ body >
4848</ html >
Original file line number Diff line number Diff line change 22 layout : null
33-- -
44
5- ( function ( jtd , undefined ) {
5+ ( function ( jtd , undefined ) {
66
77//
88// ---------------------------------------------------------
497497 /**
498498 * Scrolls sidebar navigation so the active link is centered.
499499 *
500- * Also removes the link's `href` to prevent accidental reloads.
501- *
502500 * @function scrollNav
503501 */
504502 function scrollNav ( ) {
505503 const targetLink = navLink ( ) ;
506504 if ( targetLink ) {
507505 targetLink . scrollIntoView ( { block : "center" } ) ;
508- targetLink . removeAttribute ( 'href' ) ;
509506 }
510507 }
511508
530527 }
531528 if ( target ) {
532529 target . classList . add ( 'active' ) ;
530+ target . classList . toggle ( 'active' , true ) ;
533531 target = target . parentNode ;
534532 }
535533 }
@@ -600,17 +598,17 @@ jtd.onReady(function() {
600598 const input = query ;
601599
602600 if ( ! resultsContainer ) return ;
603-
601+
604602 // Handle empty search query
605603 if ( ! query ) {
606604 // Check if there was a q parameter but it was empty
607605 if ( urlParams . has ( "q" ) ) {
608606 let pageTitle = document . querySelector ( 'title' ) ;
609607 let h1 = document . querySelector ( 'h1' ) ;
610-
608+
611609 if ( pageTitle ) pageTitle . innerText = 'Empty Search Query - No Results' ;
612610 if ( h1 ) h1 . innerText = 'No Search Term Entered' ;
613-
611+
614612 resultsContainer . innerHTML = '<p>Please enter a search term to find relevant content.</p>' ;
615613 }
616614 return ;
You can’t perform that action at this time.
0 commit comments