Make WordPress Core

Opened 6 years ago

Closed 4 years ago

#46127 closed defect (bug) (fixed)

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

Reported by: webmandesign's profile webmandesign Owned by: audrasjb's profile audrasjb
Milestone: 5.6 Priority: normal
Severity: normal Version: 4.5
Component: Media Keywords: has-patch
Focuses: ui, accessibility, administration Cc:

Description

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.

Attachments (1)

46127.1.patch (651 bytes) - added by Mista-Flo 4 years ago.

Download all attachments as: .zip

Change History (28)

#1 @audrasjb
6 years ago

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

#2 @audrasjb
6 years ago

  • Keywords needs-patch added

#3 @afercia
6 years 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
6 years 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
6 years 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
6 years 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.


6 years ago

#8 @afercia
6 years ago

  • Milestone changed from Awaiting Review to Future Release

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


5 years ago

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


5 years ago

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


4 years ago

#12 @afercia
4 years ago

  • Milestone changed from Future Release to 5.5

Related: #50410

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


4 years ago

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


4 years ago

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


4 years ago

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


4 years ago

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


4 years ago

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


4 years ago

#19 @davidbaumwald
4 years ago

@audrasjb Is this on your list to handle in 5.5 still?

#20 @audrasjb
4 years ago

  • Milestone changed from 5.5 to 5.6

Still no patch for this ticket, let's move it to milestone 5.6 as this bug needs to be fixed.

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


4 years ago

#22 @Mista-Flo
4 years ago

  • Keywords has-patch added; needs-patch removed

Hi guys, I have uploaded a patch to fix this annoying issue. It just removes the validator filter that prevents images with context to be shown. Hopefully it will help other a11y tickets to move forward to fix the pagination and infinite scroll.

I can definitely confirm it fix many ongoing issues with media. These issues are mentioned in #47215 and #50410

Last edited 4 years ago by Mista-Flo (previous) (diff)

@Mista-Flo
4 years ago

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


4 years ago

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


4 years ago

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


4 years ago

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


4 years ago

#27 @antpb
4 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 48989:

Media: Allow contextually generated images to show in Media Library grid view.
In grid view, contextually generated or cropped media is filtered out causing page numbering to be offset and incorrect. This also impacted any media utilizing media-models.js.
Props webmandesign, audrasjb, afercia, pbiron, mista-flo.
Fixes #46127, #50410, #47215.

Note: See TracTickets for help on using tickets.