WordPress.org

Make WordPress Core

Changeset 37229


Ignore:
Timestamp:
04/17/2016 12:00:23 PM (5 years ago)
Author:
afercia
Message:

Customizer, Site Icon preview: improve alt attributes and text accessibility.

Props shahpranaf, TacoVerdo, afercia.

Fixes #36562.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-site-icon-control.php

    r37012 r37229  
    6565                <div class="site-icon-preview">
    6666                    <div class="favicon-preview">
    67                         <img src="<?php echo esc_url( admin_url( 'images/browser.png' ) ); ?>" class="browser-preview" width="182" alt="<?php esc_attr_e( 'Browser interface preview' ); ?>" />
     67                        <img src="<?php echo esc_url( admin_url( 'images/browser.png' ) ); ?>" class="browser-preview" width="182" alt="" />
    6868
    6969                        <div class="favicon">
    7070                            <img id="preview-favicon" src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
    7171                        </div>
    72                         <span class="browser-title"><?php bloginfo( 'name' ); ?></span>
     72                        <span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
    7373                    </div>
    7474                    <img class="app-icon-preview" src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
  • trunk/src/wp-includes/media-template.php

    r35567 r37229  
    12331233
    12341234    <script type="text/html" id="tmpl-crop-content">
    1235         <img class="crop-image" src="{{ data.url }}" alt="">
     1235        <img class="crop-image" src="{{ data.url }}" alt="<?php esc_attr_e( 'Image crop area preview. Requires mouse interaction.' ); ?>">
    12361236        <div class="upload-errors"></div>
    12371237    </script>
     
    12391239    <script type="text/html" id="tmpl-site-icon-preview">
    12401240        <h2><?php _e( 'Preview' ); ?></h2>
    1241         <strong><?php _e( 'As a browser icon' ); ?></strong>
     1241        <strong aria-hidden="true"><?php _e( 'As a browser icon' ); ?></strong>
    12421242        <div class="favicon-preview">
    12431243            <img src="images/browser.png" class="browser-preview" width="182" height="" alt="" />
     
    12461246                <img id="preview-favicon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
    12471247            </div>
    1248             <span class="browser-title"><?php bloginfo( 'name' ); ?></span>
    1249         </div>
    1250 
    1251         <strong><?php _e( 'As an app icon' ); ?></strong>
     1248            <span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
     1249        </div>
     1250
     1251        <strong aria-hidden="true"><?php _e( 'As an app icon' ); ?></strong>
    12521252        <div class="app-icon-preview">
    12531253            <img id="preview-app-icon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
Note: See TracChangeset for help on using the changeset viewer.