Make WordPress Core

Opened 14 months ago

Last modified 9 months ago

#46127 reviewing defect (bug)

Allow editing cropped images in Media Library grid view (not just the list view)

Reported by: webmandesign Owned by: audrasjb
Milestone: Future Release Priority: normal
Severity: normal Version: 4.5
Component: Media Keywords: needs-patch
Focuses: ui, accessibility, administration Cc:


When a user uploads a logo image via customizer "Site Identity" panel and crops the image, there is no way to edit the image details subsequently in Media Library when it is switched to grid view (which is default).

To edit the cropped logo image details (such as image alt text), user needs to switch to list view of Media Library, where the image is properly listed and so can be edited. This is not really intuitive behavior.

(The same applies for other cropped images produced by WordPress, such as cropped custom header images uploaded via customizer.)

This also means that Media Library grid view displays different number of attachments/media than the list view.

Ideally Media Library should list the same attachments in both grid and list views. So we can edit all, even cropped images in grid view too.

Change History (10)

#1 @audrasjb
14 months ago

  • Owner set to audrasjb
  • Status changed from new to reviewing

#2 @audrasjb
14 months ago

  • Keywords needs-patch added

#3 @afercia
14 months ago

  • Version changed from 5.0.3 to 4.5

Thanks @webmandesign. I think there's some logic in place to make the logo image alt attribute populated automatically with the site title, e.g. alt="My awesome site". It also updates when the site title is updated in the General Settings > Site title.

But yes, it can't be edited and the cropped image isn't listed in the grid view. Can't recall if this was by a design choice but worth reconsidering it.

#4 @webmandesign
14 months ago

Hi @afercia,

Thanks for your feedback!

Yes, get_custom_logo() falls back to site name by default if there is no alt text set for logo image. FYI, if you skip cropping image logo, the correct image alt text is applied (if set for the image via Media Library).

But recently I've had a customer who has set a custom alt text for his custom logo image but wasn't seeing the alt text in the logo HTML code, it was simply not applied there. I've had a "great" time searching for a solution: the logo image was cropped and it was not listed in grid view, just in list view ;) Who would thought about that :)

#5 @afercia
14 months ago

Thanks for the additional details :) So:

  • if the image is cropped, it gets the site title with no way to edit the alt text
  • if it's not cropped, it gets the alt text previously set in the media library

Doesn't sound correct to me :) Definitely needs feedback from the media team.

#6 @webmandesign
14 months ago

You actually can edit alt text for both images. The only difference:

If the image is cropped during site logo setup in customizer, a new image (cropped copy of original) is added to Media Library by WordPress. You can edit this cropped image and set its alt text in Media Library, but only if you to switch to list view - in grid view it is not accessible for editing.

(If interested, my original communication with customer reporting the issue can be found at https://support.webmandesign.eu/forums/topic/alt-text-issues/)

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

14 months ago

#8 @afercia
14 months ago

  • Milestone changed from Awaiting Review to Future Release

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

9 months ago

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

9 months ago

Note: See TracTickets for help on using tickets.