diff -r 48c4eec2b7e6 -r 8c2e4d02f4ef wp/wp-admin/js/accordion.js --- a/wp/wp-admin/js/accordion.js Fri Sep 05 18:40:08 2025 +0200 +++ b/wp/wp-admin/js/accordion.js Fri Sep 05 18:52:52 2025 +0200 @@ -7,18 +7,18 @@ * *
*
- *

- *
+ *

+ *
*
*
*
- *

- *
+ *

+ *
*
*
*
- *

- *
+ *

+ *
*
*
*
@@ -34,13 +34,7 @@ $( function () { // Expand/Collapse accordion sections on click. - $( '.accordion-container' ).on( 'click keydown', '.accordion-section-title', function( e ) { - if ( e.type === 'keydown' && 13 !== e.which ) { // "Return" key. - return; - } - - e.preventDefault(); // Keep this AFTER the key filter above. - + $( '.accordion-container' ).on( 'click', '.accordion-section-title button', function() { accordionSwitch( $( this ) ); }); @@ -54,7 +48,6 @@ */ function accordionSwitch ( el ) { var section = el.closest( '.accordion-section' ), - sectionToggleControl = section.find( '[aria-expanded]' ).first(), container = section.closest( '.accordion-container' ), siblings = container.find( '.open' ), siblingsToggleControl = siblings.find( '[aria-expanded]' ).first(), @@ -86,8 +79,8 @@ }, 150); // If there's an element with an aria-expanded attribute, assume it's a toggle control and toggle the aria-expanded value. - if ( sectionToggleControl ) { - sectionToggleControl.attr( 'aria-expanded', String( sectionToggleControl.attr( 'aria-expanded' ) === 'false' ) ); + if ( el ) { + el.attr( 'aria-expanded', String( el.attr( 'aria-expanded' ) === 'false' ) ); } }