[wp-trac] [WordPress Trac] #62107: The WordPress media library does not use its own alt text
WordPress Trac
noreply at wordpress.org
Tue Sep 24 21:53:57 UTC 2024
#62107: The WordPress media library does not use its own alt text
----------------------------+------------------------------
Reporter: CynicalStudios | Owner: joedolson
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: accessibility
----------------------------+------------------------------
Comment (by CynicalStudios):
It doesn't matter - the thumbnails in the media library all have blank alt
text in the code - notice the alt="" all over in media-template.php
{{{
<div class="thumbnail">
<# if ( data.uploading ) { #>
<div class="media-progress-
bar"><div style="width: {{ data.percent }}%"></div></div>
<# } else if ( 'image' === data.type &&
data.size && data.size.url ) { #>
<div class="centered">
<img src="{{ data.size.url
}}" draggable="false" alt="" />
</div>
<# } else { #>
<div class="centered">
<# if ( data.image &&
data.image.src && data.image.src !== data.icon ) { #>
<img src="{{
data.image.src }}" class="thumbnail" draggable="false" alt="" />
<# } else if ( data.sizes
&& data.sizes.medium ) { #>
<img src="{{
data.sizes.medium.url }}" class="thumbnail" draggable="false" alt="" />
<# } else { #>
<img src="{{
data.icon }}" class="icon" draggable="false" alt="" />
<# } #>
</div>
<div class="filename">
<div>{{ data.filename
}}</div>
</div>
<# } #>
</div>
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62107#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list