Accessibility: Fix the `alt` attribute of the Gallery images within the Classic Editor.

Passes the images `alt` attribute value to the Gallery template used within the Classic Editor.

Props yarnboy, wpboss.
Fixes #47687.

Built from https://develop.svn.wordpress.org/trunk@45725


git-svn-id: http://core.svn.wordpress.org/trunk@45536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrea Fercia 2019-08-03 11:36:53 +00:00
parent 76f482de43
commit 9228eeb47b
2 changed files with 3 additions and 3 deletions

View File

@ -1361,9 +1361,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 }}" alt="" />
<img src="{{ attachment.thumbnail.url }}" width="{{ attachment.thumbnail.width }}" height="{{ attachment.thumbnail.height }}" alt="{{ attachment.alt }}" />
<# } else { #>
<img src="{{ attachment.url }}" alt="" />
<img src="{{ attachment.url }}" alt="{{ attachment.alt }}" />
<# } #>
</dt>
<# if ( attachment.caption ) { #>

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-45724';
$wp_version = '5.3-alpha-45725';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.