Make WordPress Core

Changeset 45725


Ignore:
Timestamp:
08/03/2019 11:35:19 AM (5 years ago)
Author:
afercia
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.
Fixes #47687.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media-template.php

    r45599 r45725  
    13621362                        <dt class="gallery-icon">
    13631363                            <# if ( attachment.thumbnail ) { #>
    1364                                 <img src="{{ attachment.thumbnail.url }}" width="{{ attachment.thumbnail.width }}" height="{{ attachment.thumbnail.height }}" alt="" />
     1364                                <img src="{{ attachment.thumbnail.url }}" width="{{ attachment.thumbnail.width }}" height="{{ attachment.thumbnail.height }}" alt="{{ attachment.alt }}" />
    13651365                            <# } else { #>
    1366                                 <img src="{{ attachment.url }}" alt="" />
     1366                                <img src="{{ attachment.url }}" alt="{{ attachment.alt }}" />
    13671367                            <# } #>
    13681368                        </dt>
Note: See TracChangeset for help on using the changeset viewer.