Ticket #27406: 27406.keyboard-accessibility.diff
File 27406.keyboard-accessibility.diff, 2.3 KB (added by , 10 years ago) |
---|
-
src/wp-admin/js/accordion.js
73 73 section = panel.closest( '.accordion-section' ), 74 74 container = section.closest( '.wp-full-overlay' ), 75 75 siblings = container.find( '.accordion-section.open' ), 76 topPanel = container.find( '#customize-theme-controls > ul > .accordion-section > .accordion-section-title' ) 77 .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' ) ) { … … 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(); 84 91 } else { 85 92 siblings.removeClass( 'open' ); 86 93 content.show( 0, function() { … … 89 96 section.toggleClass( 'current-panel' ); 90 97 container.toggleClass( 'in-sub-panel' ); 91 98 } ); 99 topPanel.attr( 'tabindex', '-1' ); 100 backBtn.attr( 'tabindex', '0' ); 101 backBtn.focus(); 92 102 } 93 103 } 94 104 -
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">