Make WordPress Core


Ignore:
Timestamp:
10/23/2016 07:56:43 PM (7 years ago)
Author:
afercia
Message:

Customize: Keep previously uploaded header images in place.

On the Header Image section, the previously uploaded images disappeared off-screen
when using the keyboard to navigate and the remove "X" button got keyboard focus.
Changing the off-screen CSS technique used for the "X" buttons fixes it.

  • improves the focus style on the previously uploaded and suggested images
  • removes a tabindex="0" attribute from the current header image

Fixes #38156.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-header-image-control.php

    r37426 r38881  
    103103            <# } else { #>
    104104
    105             <# if (data.type === 'uploaded') { #>
    106                 <button type="button" class="dashicons dashicons-no close"><span class="screen-reader-text"><?php _e( 'Remove image' ); ?></span></button>
    107             <# } #>
    108 
    109105            <button type="button" class="choice thumbnail"
    110106                data-customize-image-value="{{{data.header.url}}}"
     
    113109                <img src="{{{data.header.thumbnail_url}}}" alt="{{{data.header.alt_text || data.header.description}}}">
    114110            </button>
     111
     112            <# if ( data.type === 'uploaded' ) { #>
     113                <button type="button" class="dashicons dashicons-no close"><span class="screen-reader-text"><?php _e( 'Remove image' ); ?></span></button>
     114            <# } #>
    115115
    116116            <# } #>
     
    132132                <# } else { #>
    133133
    134             <img src="{{{data.header.thumbnail_url}}}" alt="{{{data.header.alt_text || data.header.description}}}" tabindex="0"/>
     134            <img src="{{{data.header.thumbnail_url}}}" alt="{{{data.header.alt_text || data.header.description}}}" />
    135135
    136136                <# } #>
Note: See TracChangeset for help on using the changeset viewer.