diff --git src/wp-admin/css/customize-nav-menus.css src/wp-admin/css/customize-nav-menus.css
index 77a839c..a6df8a8 100644
|
|
|
|
| 619 | 619 | background: #eee; |
| 620 | 620 | } |
| 621 | 621 | |
| 622 | | #available-menu-items .open .accordion-section-title:after { |
| | 622 | /* rework the arrow indicator implementation for NVDA bug see #32715 */ |
| | 623 | #available-menu-items .accordion-section-title:after { |
| | 624 | content: none !important; |
| | 625 | } |
| | 626 | |
| | 627 | #available-menu-items .accordion-section-title .toggle-indicator { |
| | 628 | display: inline-block; |
| | 629 | font-size: 20px; |
| | 630 | line-height: 1; |
| | 631 | } |
| | 632 | |
| | 633 | #available-menu-items .accordion-section-title .toggle-indicator:after { |
| | 634 | content: '\f140'; |
| | 635 | font: normal 20px/1 'dashicons'; |
| | 636 | vertical-align: top; |
| | 637 | speak: none; |
| | 638 | -webkit-font-smoothing: antialiased; |
| | 639 | -moz-osx-font-smoothing: grayscale; |
| | 640 | text-decoration: none !important; |
| | 641 | } |
| | 642 | |
| | 643 | #available-menu-items .open .accordion-section-title .toggle-indicator:after { |
| 623 | 644 | content: '\f142'; |
| 624 | 645 | } |
| 625 | 646 | |
| … |
… |
button.not-a-button { |
| 644 | 665 | #available-menu-items .accordion-section-title button { |
| 645 | 666 | display: block; |
| 646 | 667 | width: 28px; |
| 647 | | height: 32px; |
| | 668 | height: 35px; |
| 648 | 669 | position: absolute; |
| 649 | 670 | top: 5px; |
| 650 | 671 | right: 5px; |
| | 672 | cursor: pointer; |
| 651 | 673 | } |
| 652 | 674 | |
| 653 | 675 | #available-menu-items .accordion-section-title button:focus { |
diff --git src/wp-admin/js/accordion.js src/wp-admin/js/accordion.js
index 1769d27..bdd21ba 100644
|
|
|
|
| 53 | 53 | */ |
| 54 | 54 | function accordionSwitch ( el ) { |
| 55 | 55 | var section = el.closest( '.accordion-section' ), |
| | 56 | sectionToggleControl = section.find( '[aria-expanded]' ).eq( 0 ), |
| 56 | 57 | siblings = section.closest( '.accordion-container' ).find( '.open' ), |
| | 58 | siblingsToggleControl = siblings.find( '[aria-expanded]' ).eq( 0 ), |
| 57 | 59 | content = section.find( '.accordion-section-content' ); |
| 58 | 60 | |
| 59 | 61 | // This section has no content and cannot be expanded. |
| … |
… |
|
| 65 | 67 | section.toggleClass( 'open' ); |
| 66 | 68 | content.toggle( true ).slideToggle( 150 ); |
| 67 | 69 | } else { |
| | 70 | siblingsToggleControl.attr( 'aria-expanded', 'false' ); |
| 68 | 71 | siblings.removeClass( 'open' ); |
| 69 | 72 | siblings.find( '.accordion-section-content' ).show().slideUp( 150 ); |
| 70 | 73 | content.toggle( false ).slideToggle( 150 ); |
| 71 | 74 | section.toggleClass( 'open' ); |
| 72 | 75 | } |
| | 76 | |
| | 77 | // If there's an element with an aria-expanded attribute, assume it's a toggle control and toggle the aria-expanded value. |
| | 78 | if ( sectionToggleControl ) { |
| | 79 | sectionToggleControl.attr( 'aria-expanded', sectionToggleControl.attr( 'aria-expanded' ) === 'false' ? 'true' : 'false' ); |
| | 80 | } |
| 73 | 81 | } |
| 74 | 82 | |
| 75 | 83 | })(jQuery); |
diff --git src/wp-admin/js/customize-nav-menus.js src/wp-admin/js/customize-nav-menus.js
index 58c27a8..75cd1f3 100644
|
|
|
|
| 176 | 176 | |
| 177 | 177 | // Search input change handler. |
| 178 | 178 | search: function( event ) { |
| | 179 | var $searchSection = $( '#available-menu-items-search' ), |
| | 180 | $openSections = $( '#available-menu-items .accordion-section.open' ); |
| | 181 | |
| 179 | 182 | if ( ! event ) { |
| 180 | 183 | return; |
| 181 | 184 | } |
| 182 | 185 | // Manual accordion-opening behavior. |
| 183 | | if ( this.searchTerm && ! $( '#available-menu-items-search' ).hasClass( 'open' ) ) { |
| 184 | | $( '#available-menu-items .accordion-section-content' ).slideUp( 'fast' ); |
| 185 | | $( '#available-menu-items-search .accordion-section-content' ).slideDown( 'fast' ); |
| 186 | | $( '#available-menu-items .accordion-section.open' ).removeClass( 'open' ); |
| 187 | | $( '#available-menu-items-search' ).addClass( 'open' ); |
| | 186 | if ( this.searchTerm && ! $searchSection.hasClass( 'open' ) ) { |
| | 187 | $openSections.find( '.accordion-section-content' ).slideUp( 'fast' ); |
| | 188 | $searchSection.find( '.accordion-section-content' ).slideDown( 'fast' ); |
| | 189 | $openSections.find( '[aria-expanded]' ).eq( 0 ).attr( 'aria-expanded', 'false' ); |
| | 190 | $openSections.removeClass( 'open' ); |
| | 191 | $searchSection.addClass( 'open' ); |
| 188 | 192 | } |
| 189 | 193 | if ( '' === event.target.value ) { |
| 190 | | $( '#available-menu-items-search' ).removeClass( 'open' ); |
| | 194 | $searchSection.removeClass( 'open' ); |
| 191 | 195 | } |
| 192 | 196 | if ( this.searchTerm === event.target.value ) { |
| 193 | 197 | return; |
diff --git src/wp-includes/class-wp-customize-nav-menus.php src/wp-includes/class-wp-customize-nav-menus.php
index 502ad2b..cc0e4a1 100644
|
|
|
final class WP_Customize_Nav_Menus { |
| 692 | 692 | <ul class="accordion-section-content" data-type="search"></ul> |
| 693 | 693 | </div> |
| 694 | 694 | <div id="new-custom-menu-item" class="accordion-section"> |
| 695 | | <h4 class="accordion-section-title"><?php _e( 'Custom Links' ); ?><button type="button" class="not-a-button"><span class="screen-reader-text"><?php _e( 'Toggle' ); ?></span></button></h4> |
| | 695 | <h4 class="accordion-section-title" role="presentation"><?php _e( 'Custom Links' ); ?> <button type="button" class="not-a-button" aria-expanded="false"><span class="screen-reader-text"><?php _e( 'Toggle section: Custom Links' ); ?></span><span class="toggle-indicator" aria-hidden="true"></span></button></h4> |
| 696 | 696 | <div class="accordion-section-content"> |
| 697 | 697 | <input type="hidden" value="custom" id="custom-menu-item-type" name="menu-item[-1][menu-item-type]" /> |
| 698 | 698 | <p id="menu-item-url-wrap"> |
| … |
… |
final class WP_Customize_Nav_Menus { |
| 724 | 724 | foreach ( $post_types as $type ) : |
| 725 | 725 | ?> |
| 726 | 726 | <div id="available-menu-items-<?php echo esc_attr( $type->name ); ?>" class="accordion-section"> |
| 727 | | <h4 class="accordion-section-title"><?php echo esc_html( $type->label ); ?> <span class="spinner"></span> <span class="no-items"><?php _e( 'No items' ); ?></span> <button type="button" class="not-a-button"><span class="screen-reader-text"><?php _e( 'Toggle' ); ?></span></button></h4> |
| | 727 | <h4 class="accordion-section-title" role="presentation"><?php echo esc_html( $type->label ); ?> <span class="spinner"></span> <span class="no-items"><?php _e( 'No items' ); ?></span> <button type="button" class="not-a-button" aria-expanded="false"><span class="screen-reader-text"><?php printf( 'Toggle section: %s', esc_html( $type->label ) ); ?></span><span class="toggle-indicator" aria-hidden="true"></span></button></h4> |
| 728 | 728 | <ul class="accordion-section-content" data-type="<?php echo esc_attr( $type->name ); ?>" data-obj_type="post_type"></ul> |
| 729 | 729 | </div> |
| 730 | 730 | <?php |
| … |
… |
final class WP_Customize_Nav_Menus { |
| 736 | 736 | foreach ( $taxonomies as $tax ) : |
| 737 | 737 | ?> |
| 738 | 738 | <div id="available-menu-items-<?php echo esc_attr( $tax->name ); ?>" class="accordion-section"> |
| 739 | | <h4 class="accordion-section-title"><?php echo esc_html( $tax->label ); ?> <span class="spinner"></span> <span class="no-items"><?php _e( 'No items' ); ?></span> <button type="button" class="not-a-button"><span class="screen-reader-text"><?php _e( 'Toggle' ); ?></span></button></h4> |
| | 739 | <h4 class="accordion-section-title" role="presentation"><?php echo esc_html( $tax->label ); ?> <span class="spinner"></span> <span class="no-items"><?php _e( 'No items' ); ?></span> <button type="button" class="not-a-button" aria-expanded="false"><span class="screen-reader-text"><?php printf( 'Toggle section: %s', esc_html( $tax->label ) ); ?></span><span class="toggle-indicator" aria-hidden="true"></span></button></h4> |
| 740 | 740 | <ul class="accordion-section-content" data-type="<?php echo esc_attr( $tax->name ); ?>" data-obj_type="taxonomy"></ul> |
| 741 | 741 | </div> |
| 742 | 742 | <?php |