Changeset 59224 for trunk/src/js/_enqueues/wp/customize/controls.js
- Timestamp:
- 10/13/2024 07:07:06 PM (14 months ago)
- File:
-
- 1 edited
-
trunk/src/js/_enqueues/wp/customize/controls.js (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/wp/customize/controls.js
r59197 r59224 1531 1531 1532 1532 // Expand/Collapse accordion sections on click. 1533 section.container.find( '.accordion-section-title , .customize-section-back' ).on( 'click keydown', function( event ) {1533 section.container.find( '.accordion-section-title button, .customize-section-back' ).on( 'click keydown', function( event ) { 1534 1534 if ( api.utils.isKeydownButNotEnterEvent( event ) ) { 1535 1535 return; … … 1606 1606 overlay = section.headContainer.closest( '.wp-full-overlay' ), 1607 1607 backBtn = content.find( '.customize-section-back' ), 1608 sectionTitle = section.headContainer.find( '.accordion-section-title ' ).first(),1608 sectionTitle = section.headContainer.find( '.accordion-section-title button' ).first(), 1609 1609 expand, panel; 1610 1610 … … 1616 1616 expand = function() { 1617 1617 section._animateChangeExpanded( function() { 1618 sectionTitle.attr( 'tabindex', '-1' );1619 backBtn.attr( 'tabindex', '0' );1620 1621 1618 backBtn.trigger( 'focus' ); 1622 1619 content.css( 'top', '' ); … … 1664 1661 } 1665 1662 section._animateChangeExpanded( function() { 1666 backBtn.attr( 'tabindex', '-1' );1667 sectionTitle.attr( 'tabindex', '0' );1668 1663 1669 1664 sectionTitle.trigger( 'focus' ); … … 2700 2695 content = section.contentContainer, 2701 2696 backBtn = content.find( '.customize-section-back' ), 2702 sectionTitle = section.headContainer.find( '.accordion-section-title ' ).first(),2697 sectionTitle = section.headContainer.find( '.accordion-section-title button' ).first(), 2703 2698 body = $( document.body ), 2704 2699 expand, panel; … … 2720 2715 expand = function() { 2721 2716 section._animateChangeExpanded( function() { 2722 sectionTitle.attr( 'tabindex', '-1' );2723 backBtn.attr( 'tabindex', '0' );2724 2725 2717 backBtn.trigger( 'focus' ); 2726 2718 content.css( 'top', '' ); … … 2753 2745 } 2754 2746 section._animateChangeExpanded( function() { 2755 backBtn.attr( 'tabindex', '-1' );2756 sectionTitle.attr( 'tabindex', '0' );2757 2747 2758 2748 sectionTitle.trigger( 'focus' ); … … 2844 2834 2845 2835 // Expand/Collapse accordion sections on click. 2846 panel.headContainer.find( '.accordion-section-title ' ).on( 'click keydown', function( event ) {2836 panel.headContainer.find( '.accordion-section-title button' ).on( 'click keydown', function( event ) { 2847 2837 if ( api.utils.isKeydownButNotEnterEvent( event ) ) { 2848 2838 return; … … 2948 2938 overlay = accordionSection.closest( '.wp-full-overlay' ), 2949 2939 container = accordionSection.closest( '.wp-full-overlay-sidebar-content' ), 2950 topPanel = panel.headContainer.find( '.accordion-section-title ' ),2940 topPanel = panel.headContainer.find( '.accordion-section-title button' ), 2951 2941 backBtn = accordionSection.find( '.customize-panel-back' ), 2952 2942 childSections = panel.sections(), … … 2975 2965 } else { 2976 2966 panel._animateChangeExpanded( function() { 2977 topPanel.attr( 'tabindex', '-1' );2978 backBtn.attr( 'tabindex', '0' );2979 2980 2967 backBtn.trigger( 'focus' ); 2981 2968 accordionSection.css( 'top', '' ); … … 2997 2984 if ( ! skipTransition ) { 2998 2985 panel._animateChangeExpanded( function() { 2999 topPanel.attr( 'tabindex', '0' );3000 backBtn.attr( 'tabindex', '-1' );3001 2986 3002 2987 topPanel.focus();
Note: See TracChangeset
for help on using the changeset viewer.