Ticket #27406: 27406.3.diff
File 27406.3.diff, 3.0 KB (added by , 10 years ago) |
---|
-
src/wp-admin/js/accordion.js
69 69 } 70 70 71 71 function panelSwitch( panel ) { 72 var position, 72 var position, scroll, 73 73 section = panel.closest( '.accordion-section' ), 74 container = section.closest( '.wp-full-overlay' ), 75 siblings = container.find( '.accordion-section.open' ), 74 overlay = section.closest( '.wp-full-overlay' ), 75 container = section.closest( '.accordion-container' ), 76 siblings = container.find( '.open' ), 77 topPanel = overlay.find( '#customize-theme-controls > ul > .accordion-section > .accordion-section-title' ).add( '#customize-info > .accordion-section-title' ), 78 backBtn = section.find( '.control-panel-back' ), 79 panelTitle = section.find( '.accordion-section-title' ).first(), 76 80 content = section.find( '.control-panel-content' ); 77 81 78 82 if ( section.hasClass( 'current-panel' ) ) { 79 83 section.toggleClass( 'current-panel' ); 80 container.toggleClass( 'in-sub-panel' );84 overlay.toggleClass( 'in-sub-panel' ); 81 85 content.delay( 180 ).hide( 0, function() { 82 86 content.css( 'margin-top', 'inherit' ); // Reset 83 87 } ); 88 topPanel.attr( 'tabindex', '0' ); 89 backBtn.attr( 'tabindex', '-1' ); 90 panelTitle.focus(); 91 container.scrollTop( 0 ); 84 92 } else { 93 // Close all open sections in any accordion level. 85 94 siblings.removeClass( 'open' ); 95 siblings.find( sectionContent ).show().slideUp( 150 ); 86 96 content.show( 0, function() { 87 97 position = content.offset().top; 88 content.css( 'margin-top', ( 45 - position ) ); 98 scroll = container.scrollTop(); 99 content.css( 'margin-top', ( 45 - position - scroll ) ); 89 100 section.toggleClass( 'current-panel' ); 90 container.toggleClass( 'in-sub-panel' ); 101 overlay.toggleClass( 'in-sub-panel' ); 102 container.scrollTop( 0 ); 91 103 } ); 104 topPanel.attr( 'tabindex', '-1' ); 105 backBtn.attr( 'tabindex', '0' ); 106 backBtn.focus(); 92 107 } 93 108 } 94 109 -
src/wp-includes/class-wp-customize-section.php
240 240 ?> 241 241 <li id="accordion-section-<?php echo esc_attr( $this->id ); ?>" class="control-section control-panel accordion-section"> 242 242 <h3 class="accordion-section-title" tabindex="0"><?php echo esc_html( $this->title ); ?></h3> 243 <span class="control-panel-back" tabindex=" 0"><span class="screen-reader-text">Back to Customize</span></span>243 <span class="control-panel-back" tabindex="-1"><span class="screen-reader-text">Back to Customize</span></span> 244 244 <ul class="accordion-sub-container control-panel-content"> 245 245 <li class="accordion-section control-section<?php if ( empty( $this->description ) ) echo ' cannot-expand'; ?>"> 246 246 <div class="accordion-section-title" tabindex="0">