Make WordPress Core

Opened 8 months ago

Last modified 3 months ago

#47808 new defect (bug)

WP Media Gallery incorrecy showing "alt text"

Reported by: minddoodle Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 5.2.2
Component: Media Keywords:
Focuses: ui Cc:



I have discovered that when a user completes the following workflow the WP gallery is incorrectly showing the "alt text" and "title" field attributes.

1) create post
2) upload image
2.1) specify "alt text" image text e.g. "hello world"
3) update/save post
4) open Media --> Library
5) select the image created in step 2
6) inspect the properties of the image
ERROR: the "alt text" property is blank!

NOTE: when the post is rendered to HTML it does show the correct alt text (as per 2.1)

Attachments (1)

WordPress Media Library Bug.pptx (497.6 KB) - added by minddoodle 8 months ago.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
8 months ago

  • Component changed from Gallery to Media

#2 @SergeyBiryukov
8 months ago

Hi @minddoodle, welcome to WordPress Trac! Thanks for the report.

Unless I'm missing something, this appears to be the expected behavior:

  • When you're adding an alt text in the Image block settings in the post editor, it only applies to that specific block in that specific post.
  • If you'd like the alt text to be saved with the image, it can be done in two ways:
    • By going to Media Library and editing the image there.
    • By adding an alt text in the "Attachment Details" sidebar after selecting an image from Media Library in the "Select or Upload Media" modal when editing a post.

#3 @sabernhardt
3 months ago

Related: Gutenberg issue GB8941

#4 @SergeyBiryukov
3 months ago

Related/duplicate: #49165

Note: See TracTickets for help on using tickets.