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.
Merges [45725] to the 5.2 branch.
Fixes #47687.
Built from https://develop.svn.wordpress.org/branches/5.2@45865


git-svn-id: http://core.svn.wordpress.org/branches/5.2@45676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-08-20 19:15:52 +00:00
parent 49d9d2dc57
commit f6a419e564
2 changed files with 3 additions and 3 deletions

View File

@ -1294,9 +1294,9 @@ function wp_print_media_templates() {
<dl class="gallery-item"> <dl class="gallery-item">
<dt class="gallery-icon"> <dt class="gallery-icon">
<# if ( attachment.thumbnail ) { #> <# 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 { #> <# } else { #>
<img src="{{ attachment.url }}" alt="" /> <img src="{{ attachment.url }}" alt="{{ attachment.alt }}" />
<# } #> <# } #>
</dt> </dt>
<# if ( attachment.caption ) { #> <# if ( attachment.caption ) { #>

View File

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