Make WordPress Core


Ignore:
Timestamp:
11/07/2015 04:11:38 PM (9 years ago)
Author:
wonderboymusic
Message:

Accessibility: add missing alt attributes to a gaggle of <img>s.

Props afercia.
Fixes #34583.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/customize/class-wp-customize-media-control.php

    r35389 r35567  
    158158                        <div class="thumbnail thumbnail-{{ data.attachment.type }}">
    159159                            <# if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.medium ) { #>
    160                                 <img class="attachment-thumb" src="{{ data.attachment.sizes.medium.url }}" draggable="false" />
     160                                <img class="attachment-thumb" src="{{ data.attachment.sizes.medium.url }}" draggable="false" alt="" />
    161161                            <# } else if ( 'image' === data.attachment.type && data.attachment.sizes && data.attachment.sizes.full ) { #>
    162                                 <img class="attachment-thumb" src="{{ data.attachment.sizes.full.url }}" draggable="false" />
     162                                <img class="attachment-thumb" src="{{ data.attachment.sizes.full.url }}" draggable="false" alt="" />
    163163                            <# } else if ( 'audio' === data.attachment.type ) { #>
    164164                                <# if ( data.attachment.image && data.attachment.image.src && data.attachment.image.src !== data.attachment.icon ) { #>
    165                                     <img src="{{ data.attachment.image.src }}" class="thumbnail" draggable="false" />
     165                                    <img src="{{ data.attachment.image.src }}" class="thumbnail" draggable="false" alt="" />
    166166                                <# } else { #>
    167                                     <img src="{{ data.attachment.icon }}" class="attachment-thumb type-icon" draggable="false" />
     167                                    <img src="{{ data.attachment.icon }}" class="attachment-thumb type-icon" draggable="false" alt="" />
    168168                                <# } #>
    169169                                <p class="attachment-meta attachment-meta-title">&#8220;{{ data.attachment.title }}&#8221;</p>
     
    185185                                </div>
    186186                            <# } else { #>
    187                                 <img class="attachment-thumb type-icon icon" src="{{ data.attachment.icon }}" draggable="false" />
     187                                <img class="attachment-thumb type-icon icon" src="{{ data.attachment.icon }}" draggable="false" alt="" />
    188188                                <p class="attachment-title">{{ data.attachment.title }}</p>
    189189                            <# } #>
Note: See TracChangeset for help on using the changeset viewer.