WordPress.org

Make WordPress Core

Opened 13 months ago

Last modified 6 weeks ago

#48710 reviewing defect (bug)

PDF uploads are treated like images: empty alt attribute and PHP notices

Reported by: worddean Owned by: audrasjb
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Media Keywords: needs-patch reporter-feedback
Focuses: accessibility Cc:

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 (23)

#1 @audrasjb
13 months 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
13 months 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
13 months 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
13 months 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.

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


12 months ago

#7 @afercia
12 months ago

  • Summary changed from 5.3 version - empty alt attribute to PDF uploads are treated like images: empty alt attribute and PHP notices

#8 @afercia
12 months ago

This ticket was discussed during today's accessibility bug-scrub: part of the issue was already reported upstream on the Gutenberg repository. Other parts of this issue relate to the core media instead and should be addressed in core.

Last edited 11 months ago by afercia (previous) (diff)

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


11 months ago

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


9 months ago

#11 @afercia
9 months ago

  • Milestone changed from Awaiting Review to 5.5

This ticket was discussed during today's accessibility bug-scrub: agreed this would be a nice fix for WordPress 5.5.

Reported also on the Gutenberg repo https://github.com/WordPress/gutenberg/issues/18593

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


7 months ago

#13 @afercia
7 months ago

This ticket was discussed during today's accessibility bug-scrub. It would need some prioritisation from the Media team and a Media focus lead yet-to-nominate for the 5.5 milestone.

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


6 months ago

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


5 months ago

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


4 months ago

#17 @davidbaumwald
4 months ago

  • Milestone changed from 5.5 to Future Release

This was discussed during today's scrub. With 5.5 RC1 approaching, this is being moved to Future Release. If any maintainer or committer feels this can be resolved in time, or wishes to assume ownership during a specific cycle, please update the milestone accordingly.

#18 @afercia
3 months ago

  • Keywords needs-patch added
  • Milestone changed from Future Release to 5.6

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


7 weeks ago

This ticket was mentioned in Slack in #core-media by hellofromtonya. View the logs.


7 weeks ago

#21 @Mista-Flo
7 weeks ago

  • Keywords reporter-feedback added

Hi there,

I miss some points about this ticket, I need a better understanding.

Could you please provide steps to reproduce the issue @worddean?

Is this only affecting the block editor or also classic editor?

What do we want to fix here, what is the expected result?

EDIT: I better understand the issue when reading the Github issue actually, I'm not sure how to fix the issue though, the media library can be really tricky to modify.

Last edited 7 weeks ago by Mista-Flo (previous) (diff)

This ticket was mentioned in Slack in #accessibility by audrasjb. View the logs.


6 weeks ago

#23 @audrasjb
6 weeks ago

  • Milestone changed from 5.6 to Future Release

As this issue didn't move during 5.6 alpha cycle, let's move it to Future release.

Note: See TracTickets for help on using tickets.