mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-20 11:14:28 +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:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user