Make WordPress Core

Ticket #33260: 33260.3.diff

File 33260.3.diff, 1.4 KB (added by TomHarrigan, 10 years ago)

Implement fix using button elements, aria tags to be consistent with Menu Customizer

  • src/wp-includes/class-wp-customize-control.php

     
    14561456         * @access public
    14571457         */
    14581458        public function render_content() {
     1459                $id = 'reorder-widgets-desc-' . str_replace( '[', '-', str_replace( ']', '', $this->id ) );
    14591460                ?>
    1460                 <span class="button-secondary add-new-widget" tabindex="0">
     1461                <button type="button" class="button-secondary add-new-widget" aria-label="<?php esc_attr_e( 'Add or remove widgets' ); ?>" aria-expanded="false" aria-controls="available-widgets">
    14611462                        <?php _e( 'Add a Widget' ); ?>
    1462                 </span>
    1463 
    1464                 <span class="reorder-toggle" tabindex="0">
     1463                </button>
     1464                <button type="button" class="not-a-button reorder-toggle" aria-label="<?php esc_attr_e( 'Reorder menu items' ); ?>" aria-describedby="<?php echo esc_attr( $id ); ?>">
    14651465                        <span class="reorder"><?php _ex( 'Reorder', 'Reorder widgets in Customizer' ); ?></span>
    14661466                        <span class="reorder-done"><?php _ex( 'Done', 'Cancel reordering widgets in Customizer' ); ?></span>
    1467                 </span>
     1467                </button>
     1468                <p class="screen-reader-text" id="<?php echo esc_attr( $id ); ?>"><?php _e( 'When in reorder mode, additional controls to reorder widgets will be available in the widgets list above.' ); ?></p>
    14681469                <?php
    14691470        }
    14701471