Accessibility: add missing alt attributes to a gaggle of <img>s.
Props afercia. Fixes #34583. Built from https://develop.svn.wordpress.org/trunk@35567 git-svn-id: http://core.svn.wordpress.org/trunk@35531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -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 ) {
|
||||
|
||||
@@ -1 +1 @@
|
||||
tinymce.PluginManager.add("wpgallery",function(a){function b(a){return a.replace(/\[gallery([^\]]*)\]/g,function(a){return c("wp-gallery",a)})}function c(a,b){return b=window.encodeURIComponent(b),'<img src="'+tinymce.Env.transparentSrc+'" class="wp-media mceItem '+a+'" data-wp-media="'+b+'" data-mce-resize="false" data-mce-placeholder="1" />'}function d(a){function b(a,b){return b=new RegExp(b+'="([^"]+)"').exec(a),b?window.decodeURIComponent(b[1]):""}return a.replace(/(?:<p(?: [^>]+)?>)*(<img [^>]+>)(?:<\/p>)*/g,function(a,c){var d=b(c,"data-wp-media");return d?"<p>"+d+"</p>":a})}function e(b){var c,d,e;"IMG"===b.nodeName&&"undefined"!=typeof wp&&wp.media&&(e=window.decodeURIComponent(a.dom.getAttrib(b,"data-wp-media")),a.dom.hasClass(b,"wp-gallery")&&wp.media.gallery&&(c=wp.media.gallery,d=c.edit(e),d.state("gallery-edit").on("update",function(e){var f=c.shortcode(e).string();a.dom.setAttrib(b,"data-wp-media",window.encodeURIComponent(f)),d.detach()})))}a.addCommand("WP_Gallery",function(){e(a.selection.getNode())}),a.on("mouseup",function(b){function c(){d.removeClass(d.select("img.wp-media-selected"),"wp-media-selected")}var d=a.dom,f=b.target;"IMG"===f.nodeName&&d.getAttrib(f,"data-wp-media")?2!==b.button&&(d.hasClass(f,"wp-media-selected")?e(f):(c(),d.addClass(f,"wp-media-selected"))):c()}),a.on("ResolveName",function(b){var c=a.dom,d=b.target;"IMG"===d.nodeName&&c.getAttrib(d,"data-wp-media")&&c.hasClass(d,"wp-gallery")&&(b.name="gallery")}),a.on("BeforeSetContent",function(c){a.plugins.wpview&&"undefined"!=typeof wp&&wp.mce||(c.content=b(c.content))}),a.on("PostProcess",function(a){a.get&&(a.content=d(a.content))})});
|
||||
tinymce.PluginManager.add("wpgallery",function(a){function b(a){return a.replace(/\[gallery([^\]]*)\]/g,function(a){return c("wp-gallery",a)})}function c(a,b){return b=window.encodeURIComponent(b),'<img src="'+tinymce.Env.transparentSrc+'" class="wp-media mceItem '+a+'" data-wp-media="'+b+'" data-mce-resize="false" data-mce-placeholder="1" alt="" />'}function d(a){function b(a,b){return b=new RegExp(b+'="([^"]+)"').exec(a),b?window.decodeURIComponent(b[1]):""}return a.replace(/(?:<p(?: [^>]+)?>)*(<img [^>]+>)(?:<\/p>)*/g,function(a,c){var d=b(c,"data-wp-media");return d?"<p>"+d+"</p>":a})}function e(b){var c,d,e;"IMG"===b.nodeName&&"undefined"!=typeof wp&&wp.media&&(e=window.decodeURIComponent(a.dom.getAttrib(b,"data-wp-media")),a.dom.hasClass(b,"wp-gallery")&&wp.media.gallery&&(c=wp.media.gallery,d=c.edit(e),d.state("gallery-edit").on("update",function(e){var f=c.shortcode(e).string();a.dom.setAttrib(b,"data-wp-media",window.encodeURIComponent(f)),d.detach()})))}a.addCommand("WP_Gallery",function(){e(a.selection.getNode())}),a.on("mouseup",function(b){function c(){d.removeClass(d.select("img.wp-media-selected"),"wp-media-selected")}var d=a.dom,f=b.target;"IMG"===f.nodeName&&d.getAttrib(f,"data-wp-media")?2!==b.button&&(d.hasClass(f,"wp-media-selected")?e(f):(c(),d.addClass(f,"wp-media-selected"))):c()}),a.on("ResolveName",function(b){var c=a.dom,d=b.target;"IMG"===d.nodeName&&c.getAttrib(d,"data-wp-media")&&c.hasClass(d,"wp-gallery")&&(b.name="gallery")}),a.on("BeforeSetContent",function(c){a.plugins.wpview&&"undefined"!=typeof wp&&wp.mce||(c.content=b(c.content))}),a.on("PostProcess",function(a){a.get&&(a.content=d(a.content))})});
|
||||
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-beta3-35566';
|
||||
$wp_version = '4.4-beta3-35567';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user