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.


git-svn-id: https://develop.svn.wordpress.org/trunk@45725 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrea Fercia 2019-08-03 11:35:19 +00:00
parent a634252c15
commit 101fd0647c
1 changed files with 2 additions and 2 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 ) { #>