Skip to content
Permalink
Browse files

Accessibility: Fix the `alt` attribute of the Gallery images within t…

…he 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.

git-svn-id: https://develop.svn.wordpress.org/branches/5.2@45865 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information...
SergeyBiryukov committed Aug 20, 2019
1 parent 394351c commit e337c89e8c460450a688353ba92a0763ff1ae60f
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/wp-includes/media-template.php
@@ -1294,9 +1294,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 ) { #>

0 comments on commit e337c89

Please sign in to comment.
You can’t perform that action at this time.