WordPress.org

Make WordPress Core

Opened 3 weeks ago

Last modified 3 weeks ago

#48710 reviewing defect (bug)

5.3 version - empty alt attribute

Reported by: worddean Owned by: audrasjb
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Media Keywords:
Focuses: accessibility Cc:
PR Number:

Description

uploading a .pdf image in posts reads the following;
"this image has an empty alt attribute: its file name is.... .pdf"

I am a regular user since 1.5 versions of WP and this is my first bug, or error report. I tried downgrading, but it kept coming back error.

Change History (5)

#1 @audrasjb
3 weeks ago

  • Component changed from Posts, Post Types to Media
  • Focuses accessibility added
  • Owner set to audrasjb
  • Severity changed from major to normal
  • Status changed from new to reviewing

Hi @worddean, thank you for opening this ticket and welcome to WordPress Trac!

Self assigning for review.

#2 follow-up: @audrasjb
3 weeks ago

@worddean could you please clarify which editor you are using when the issue occurs. I can reproduce it in the Block Editor but not sure it's what you are talking about.

For the moment, the block editor is not able to use PDF thumbnails. Worth reporting the issue about the weird message in Gutenberg GitHub repository.

#3 in reply to: ↑ 2 @worddean
3 weeks ago

Replying to audrasjb:

@worddean could you please clarify which editor you are using when the issue occurs. I can reproduce it in the Block Editor but not sure it's what you are talking about.

For the moment, the block editor is not able to use PDF thumbnails. Worth reporting the issue about the weird message in Gutenberg GitHub repository.

This is an example - http://istartonmonday.com/?p=75520 - as when you post a .pdf it shows and then you click on it to download

#5 @afercia
3 weeks ago

  • Version 5.3 deleted

Seems to me after a page refresh (or navigating away and re-editing the post) there are also a couple PHP notices related to undefined index $image_meta['file']:

Notice: Undefined index: file in /srv/www/wordpress-develop/public_html/build/wp-includes/media.php 

on line 1535 and 1551. I can reproduce on 5.2 as well (haven't tested previous versions but it's probably there since 5.0?).

To start with, the media views shouldn't allow to select a PDF from the Image block, thus the attachment type should be filtered in the media modal.

Note: See TracTickets for help on using tickets.