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

Props shahpranaf, TacoVerdo, afercia.

Fixes #36562.
Built from https://develop.svn.wordpress.org/trunk@37229


git-svn-id: http://core.svn.wordpress.org/trunk@37195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2016-04-17 12:01:27 +00:00
parent 5cbdf22c0f
commit 85cac9d47e
3 changed files with 7 additions and 7 deletions

View File

@ -64,12 +64,12 @@ class WP_Customize_Site_Icon_Control extends WP_Customize_Cropped_Image_Control
<div class="container">
<div class="site-icon-preview">
<div class="favicon-preview">
<img src="<?php echo esc_url( admin_url( 'images/browser.png' ) ); ?>" class="browser-preview" width="182" alt="<?php esc_attr_e( 'Browser interface preview' ); ?>" />
<img src="<?php echo esc_url( admin_url( 'images/browser.png' ) ); ?>" class="browser-preview" width="182" alt="" />
<div class="favicon">
<img id="preview-favicon" src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
</div>
<span class="browser-title"><?php bloginfo( 'name' ); ?></span>
<span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
</div>
<img class="app-icon-preview" src="{{ data.attachment.sizes.full.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
</div>

View File

@ -1232,23 +1232,23 @@ function wp_print_media_templates() {
</script>
<script type="text/html" id="tmpl-crop-content">
<img class="crop-image" src="{{ data.url }}" alt="">
<img class="crop-image" src="{{ data.url }}" alt="<?php esc_attr_e( 'Image crop area preview. Requires mouse interaction.' ); ?>">
<div class="upload-errors"></div>
</script>
<script type="text/html" id="tmpl-site-icon-preview">
<h2><?php _e( 'Preview' ); ?></h2>
<strong><?php _e( 'As a browser icon' ); ?></strong>
<strong aria-hidden="true"><?php _e( 'As a browser icon' ); ?></strong>
<div class="favicon-preview">
<img src="images/browser.png" class="browser-preview" width="182" height="" alt="" />
<div class="favicon">
<img id="preview-favicon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as a browser icon' ); ?>"/>
</div>
<span class="browser-title"><?php bloginfo( 'name' ); ?></span>
<span class="browser-title" aria-hidden="true"><?php bloginfo( 'name' ); ?></span>
</div>
<strong><?php _e( 'As an app icon' ); ?></strong>
<strong aria-hidden="true"><?php _e( 'As an app icon' ); ?></strong>
<div class="app-icon-preview">
<img id="preview-app-icon" src="{{ data.url }}" alt="<?php esc_attr_e( 'Preview as an app icon' ); ?>"/>
</div>

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-alpha-37228';
$wp_version = '4.6-alpha-37229';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.