mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-09 15:14:37 +00:00
Accessibility: add missing alt attributes to a gaggle of <img>s.
Props afercia. Fixes #34583. git-svn-id: https://develop.svn.wordpress.org/trunk@35567 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -157,14 +157,14 @@ class WP_Customize_Media_Control extends WP_Customize_Control {
|
||||
<div class="attachment-media-view attachment-media-view-{{ data.attachment.type }} {{ data.attachment.orientation }}">
|
||||
<div class="thumbnail thumbnail-{{ data.attachment.type }}">
|
||||
<# if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.medium ) { #>
|
||||
<img class="attachment-thumb" src="{{ data.attachment.sizes.medium.url }}" draggable="false" />
|
||||
<img class="attachment-thumb" src="{{ data.attachment.sizes.medium.url }}" draggable="false" alt="" />
|
||||
<# } else if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.full ) { #>
|
||||
<img class="attachment-thumb" src="{{ data.attachment.sizes.full.url }}" draggable="false" />
|
||||
<img class="attachment-thumb" src="{{ data.attachment.sizes.full.url }}" draggable="false" alt="" />
|
||||
<# } else if ( 'audio' === data.attachment.type ) { #>
|
||||
<# if ( data.attachment.image && data.attachment.image.src && data.attachment.image.src !== data.attachment.icon ) { #>
|
||||
<img src="{{ data.attachment.image.src }}" class="thumbnail" draggable="false" />
|
||||
<img src="{{ data.attachment.image.src }}" class="thumbnail" draggable="false" alt="" />
|
||||
<# } else { #>
|
||||
<img src="{{ data.attachment.icon }}" class="attachment-thumb type-icon" draggable="false" />
|
||||
<img src="{{ data.attachment.icon }}" class="attachment-thumb type-icon" draggable="false" alt="" />
|
||||
<# } #>
|
||||
<p class="attachment-meta attachment-meta-title">“{{ data.attachment.title }}”</p>
|
||||
<# if ( data.attachment.album || data.attachment.meta.album ) { #>
|
||||
@@ -184,7 +184,7 @@ class WP_Customize_Media_Control extends WP_Customize_Control {
|
||||
</video>
|
||||
</div>
|
||||
<# } else { #>
|
||||
<img class="attachment-thumb type-icon icon" src="{{ data.attachment.icon }}" draggable="false" />
|
||||
<img class="attachment-thumb type-icon icon" src="{{ data.attachment.icon }}" draggable="false" alt="" />
|
||||
<p class="attachment-title">{{ data.attachment.title }}</p>
|
||||
<# } #>
|
||||
</div>
|
||||
|
||||
@@ -100,7 +100,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||
|
||||
event.content = event.content.replace( /<!--more(.*?)-->/g, function( match, moretext ) {
|
||||
return '<img src="' + tinymce.Env.transparentSrc + '" data-wp-more="more" data-wp-more-text="' + moretext + '" ' +
|
||||
'class="wp-more-tag mce-wp-more" title="' + title + '" data-mce-resize="false" data-mce-placeholder="1" />';
|
||||
'class="wp-more-tag mce-wp-more" alt="" title="' + title + '" data-mce-resize="false" data-mce-placeholder="1" />';
|
||||
});
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||
|
||||
event.content = event.content.replace( /<!--nextpage-->/g,
|
||||
'<img src="' + tinymce.Env.transparentSrc + '" data-wp-more="nextpage" class="wp-more-tag mce-wp-nextpage" ' +
|
||||
'title="' + title + '" data-mce-resize="false" data-mce-placeholder="1" />' );
|
||||
'alt="" title="' + title + '" data-mce-resize="false" data-mce-placeholder="1" />' );
|
||||
}
|
||||
|
||||
if ( event.load && event.format !== 'raw' && hasWpautop ) {
|
||||
@@ -162,7 +162,7 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
||||
classname += ' mce-wp-' + tag;
|
||||
title = tag === 'more' ? 'Read more...' : 'Next page';
|
||||
title = __( title );
|
||||
html = '<img src="' + tinymce.Env.transparentSrc + '" title="' + title + '" class="' + classname + '" ' +
|
||||
html = '<img src="' + tinymce.Env.transparentSrc + '" alt="" title="' + title + '" class="' + classname + '" ' +
|
||||
'data-wp-more="' + tag + '" data-mce-resize="false" data-mce-placeholder="1" />';
|
||||
|
||||
// Most common case
|
||||
|
||||
@@ -10,7 +10,7 @@ tinymce.PluginManager.add('wpgallery', function( editor ) {
|
||||
function html( cls, data ) {
|
||||
data = window.encodeURIComponent( data );
|
||||
return '<img src="' + tinymce.Env.transparentSrc + '" class="wp-media mceItem ' + cls + '" ' +
|
||||
'data-wp-media="' + data + '" data-mce-resize="false" data-mce-placeholder="1" />';
|
||||
'data-wp-media="' + data + '" data-mce-resize="false" data-mce-placeholder="1" alt="" />';
|
||||
}
|
||||
|
||||
function restoreMediaShortcodes( content ) {
|
||||
|
||||
@@ -291,11 +291,11 @@ function wp_print_media_templates() {
|
||||
<# if ( data.uploading ) { #>
|
||||
<div class="media-progress-bar"><div></div></div>
|
||||
<# } else if ( 'image' === data.type && data.sizes && data.sizes.large ) { #>
|
||||
<img class="details-image" src="{{ data.sizes.large.url }}" draggable="false" />
|
||||
<img class="details-image" src="{{ data.sizes.large.url }}" draggable="false" alt="" />
|
||||
<# } else if ( 'image' === data.type && data.sizes && data.sizes.full ) { #>
|
||||
<img class="details-image" src="{{ data.sizes.full.url }}" draggable="false" />
|
||||
<img class="details-image" src="{{ data.sizes.full.url }}" draggable="false" alt="" />
|
||||
<# } else if ( -1 === jQuery.inArray( data.type, [ 'audio', 'video' ] ) ) { #>
|
||||
<img class="details-image icon" src="{{ data.icon }}" draggable="false" />
|
||||
<img class="details-image icon" src="{{ data.icon }}" draggable="false" alt="" />
|
||||
<# } #>
|
||||
|
||||
<# if ( 'audio' === data.type ) { #>
|
||||
@@ -453,9 +453,9 @@ function wp_print_media_templates() {
|
||||
<# } else { #>
|
||||
<div class="centered">
|
||||
<# if ( data.image && data.image.src && data.image.src !== data.icon ) { #>
|
||||
<img src="{{ data.image.src }}" class="thumbnail" draggable="false" />
|
||||
<img src="{{ data.image.src }}" class="thumbnail" draggable="false" alt="" />
|
||||
<# } else { #>
|
||||
<img src="{{ data.icon }}" class="icon" draggable="false" />
|
||||
<img src="{{ data.icon }}" class="icon" draggable="false" alt="" />
|
||||
<# } #>
|
||||
</div>
|
||||
<div class="filename">
|
||||
@@ -502,9 +502,9 @@ function wp_print_media_templates() {
|
||||
<# if ( data.uploading ) { #>
|
||||
<div class="media-progress-bar"><div></div></div>
|
||||
<# } else if ( 'image' === data.type && data.sizes ) { #>
|
||||
<img src="{{ data.size.url }}" draggable="false" />
|
||||
<img src="{{ data.size.url }}" draggable="false" alt="" />
|
||||
<# } else { #>
|
||||
<img src="{{ data.icon }}" class="icon" draggable="false" />
|
||||
<img src="{{ data.icon }}" class="icon" draggable="false" alt="" />
|
||||
<# } #>
|
||||
</div>
|
||||
<div class="details">
|
||||
@@ -820,7 +820,7 @@ function wp_print_media_templates() {
|
||||
|
||||
<script type="text/html" id="tmpl-embed-image-settings">
|
||||
<div class="thumbnail">
|
||||
<img src="{{ data.model.url }}" draggable="false" />
|
||||
<img src="{{ data.model.url }}" draggable="false" alt="" />
|
||||
</div>
|
||||
|
||||
<?php
|
||||
@@ -877,7 +877,7 @@ function wp_print_media_templates() {
|
||||
<div class="embed-media-settings">
|
||||
<div class="column-image">
|
||||
<div class="image">
|
||||
<img src="{{ data.model.url }}" draggable="false" />
|
||||
<img src="{{ data.model.url }}" draggable="false" alt="" />
|
||||
|
||||
<# if ( data.attachment && window.imageEdit ) { #>
|
||||
<div class="actions">
|
||||
@@ -1208,9 +1208,9 @@ function wp_print_media_templates() {
|
||||
<dl class="gallery-item">
|
||||
<dt class="gallery-icon">
|
||||
<# if ( attachment.thumbnail ) { #>
|
||||
<img src="{{ attachment.thumbnail.url }}" width="{{ attachment.thumbnail.width }}" height="{{ attachment.thumbnail.height }}" />
|
||||
<img src="{{ attachment.thumbnail.url }}" width="{{ attachment.thumbnail.width }}" height="{{ attachment.thumbnail.height }}" alt="" />
|
||||
<# } else { #>
|
||||
<img src="{{ attachment.url }}" />
|
||||
<img src="{{ attachment.url }}" alt="" />
|
||||
<# } #>
|
||||
</dt>
|
||||
<# if ( attachment.caption ) { #>
|
||||
@@ -1232,7 +1232,7 @@ function wp_print_media_templates() {
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="tmpl-crop-content">
|
||||
<img class="crop-image" src="{{ data.url }}">
|
||||
<img class="crop-image" src="{{ data.url }}" alt="">
|
||||
<div class="upload-errors"></div>
|
||||
</script>
|
||||
|
||||
@@ -1240,7 +1240,7 @@ function wp_print_media_templates() {
|
||||
<h2><?php _e( 'Preview' ); ?></h2>
|
||||
<strong><?php _e( 'As a browser icon' ); ?></strong>
|
||||
<div class="favicon-preview">
|
||||
<img src="images/browser.png" class="browser-preview" width="182" height="" alt=""/>
|
||||
<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' ); ?>"/>
|
||||
|
||||
@@ -1672,7 +1672,7 @@ function wp_underscore_playlist_templates() {
|
||||
?>
|
||||
<script type="text/html" id="tmpl-wp-playlist-current-item">
|
||||
<# if ( data.image ) { #>
|
||||
<img src="{{ data.thumb.src }}"/>
|
||||
<img src="{{ data.thumb.src }}" alt="" />
|
||||
<# } #>
|
||||
<div class="wp-playlist-caption">
|
||||
<span class="wp-playlist-item-meta wp-playlist-item-title"><?php
|
||||
|
||||
Reference in New Issue
Block a user