Make WordPress Core


Ignore:
Timestamp:
08/18/2025 08:25:45 PM (9 months ago)
Author:
joedolson
Message:

Accessibility: Make buttons to add site images look like buttons.

The buttons to add site icons, logos, header images, and background images were designed with a dashed border. This led to confusion with users thinking they were drop regions for image uploads, rather than buttons to trigger an upload.

Change design of upload buttons to clarify expected user interaction.

Props emaildano, afercia, joedolson, ankitkumarshah, logicrays, shailu25.
Fixes #47579.

File:
1 edited

Legend:

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

    r59784 r60645  
    174174
    175175                <# } #>
    176             <# } else { #>
    177 
    178             <div class="placeholder">
    179                 <?php _e( 'No image set' ); ?>
    180             </div>
    181 
    182176            <# } #>
    183177        </script>
     
    247241                <?php if ( current_user_can( 'upload_files' ) ) : ?>
    248242                <button type="button"<?php echo $visibility; ?> class="button remove" aria-label="<?php esc_attr_e( 'Hide header image' ); ?>"><?php _e( 'Hide image' ); ?></button>
    249                 <button type="button" class="button new" id="header_image-button" aria-label="<?php esc_attr_e( 'Add Header Image' ); ?>"><?php _e( 'Add Image' ); ?></button>
     243                <button type="button" class="button new <?php echo ! $this->get_current_image_src() ? '' : 'customize-header-image-not-selected'; ?>" id="header_image-button" aria-label="<?php esc_attr_e( 'Add Header Image' ); ?>"><?php _e( 'Add Image' ); ?></button>
    250244                <?php endif; ?>
    251245            </div>
Note: See TracChangeset for help on using the changeset viewer.