WordPress.org

Make WordPress Core

Changeset 32382


Ignore:
Timestamp:
05/06/2015 10:53:07 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Customizer: Use a semantic, accessible element for Remove Header Image button.

Make the button more noticeable on dark, light, and busy images.

props afercia, RDall, melchoyce.
fixes #32227, #31325.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/customize-controls.css

    r32269 r32382  
    765765
    766766.customize-control-header .uploaded .header-view .close {
    767     font-size: 2em;
    768     color: grey;
     767    font-size: 20px;
     768    color: #fff;
     769    background: #555;
     770    background: rgba(0, 0, 0, 0.5);
    769771    position: absolute;
    770     visibility: hidden;
    771772    top: 10px;
     773    right: -999px;
     774    z-index: 1;
     775    width: 26px;
     776    height: 26px;
     777    cursor: pointer;
     778}
     779
     780.customize-control-header .header-view:hover .close,
     781.customize-control-header .header-view .close:focus {
    772782    right: 10px;
    773     z-index: 1;
    774     width: 20px;
    775     height: 20px;
    776     cursor: pointer;
    777 }
    778 
    779 .customize-control-header .uploaded .header-view .close:hover {
    780  color: black;
    781  text-shadow:
    782     -1px -1px 0 #fff,
    783     1px -1px 0 #fff,
    784     -1px 1px 0 #fff,
    785     1px 1px 0 #fff;
    786 }
    787 
    788 .customize-control-header .header-view:hover .close {
    789     visibility: visible;
    790783}
    791784
  • trunk/src/wp-includes/class-wp-customize-control.php

    r32265 r32382  
    10751075
    10761076            <# if (data.type === 'uploaded') { #>
    1077                 <div class="dashicons dashicons-no close"></div>
     1077                <button type="button" class="dashicons dashicons-no close"><span class="screen-reader-text"><?php _e( 'Remove image' ); ?></span></button>
    10781078            <# } #>
    10791079
Note: See TracChangeset for help on using the changeset viewer.