WordPress.org

Make WordPress Core


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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.