WordPress.org

Make WordPress Core

Changeset 45865


Ignore:
Timestamp:
08/20/2019 07:14:29 PM (4 weeks ago)
Author:
SergeyBiryukov
Message:

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.

Location:
branches/5.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/src/wp-includes/media-template.php

    r45849 r45865  
    12951295                        <dt class="gallery-icon">
    12961296                            <# if ( attachment.thumbnail ) { #>
    1297                                 <img src="{{ attachment.thumbnail.url }}" width="{{ attachment.thumbnail.width }}" height="{{ attachment.thumbnail.height }}" alt="" />
     1297                                <img src="{{ attachment.thumbnail.url }}" width="{{ attachment.thumbnail.width }}" height="{{ attachment.thumbnail.height }}" alt="{{ attachment.alt }}" />
    12981298                            <# } else { #>
    1299                                 <img src="{{ attachment.url }}" alt="" />
     1299                                <img src="{{ attachment.url }}" alt="{{ attachment.alt }}" />
    13001300                            <# } #>
    13011301                        </dt>
Note: See TracChangeset for help on using the changeset viewer.