Make WordPress Core

Opened 4 weeks ago

Closed 4 weeks ago

Last modified 4 weeks ago

#66293 closed defect (bug) (duplicate)

Media: Image title overlay covers the caption field in the Edit gallery screen

Reported by: wildworks Owned by:
Priority: normal Milestone:
Component: Media Version: 7.0
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

In the media modal's "Edit gallery" screen, the caption field below each image is covered by an overlay that shows the image title. The caption value and the placeholder ("Caption…") are only partly visible behind the overlay, so it is hard to read or edit captions.

This was introduced in [61757].

Steps to reproduce

  1. Upload a few images, and give some of them a caption.
  2. In the block editor, insert a Gallery block and click "Media Library".
  3. Select the images and click "Create a new gallery" to go to the "Edit gallery" screen.
  4. Look at the caption field below each image.

Attachments (2)

r61756-before.png​ (56.3 KB ) - added by wildworks 4 weeks ago.
r61757-after.png​ (58.5 KB ) - added by wildworks 4 weeks ago.

Download all attachments as: .zip

Change History (4)

#1 @joedolson
4 weeks ago

  • Milestone Awaiting Review
  • Resolution → duplicate
  • Status new → closed

Duplicate of #66076.

Thanks for reporting! This issue is already being tracked in #60076

This ticket was mentioned in ​PR #14232 on ​WordPress/wordpress-develop by ​@wprashed.


4 weeks ago
#2

  • Keywords has-patch added

---

Description

In [61757], an aria-label overlay was introduced on attachments without filenames (.wp-core-ui .attachment:not(:has(.filename))::after) to display visible image titles for voice control users.

In the media modal's "Edit gallery" screen (and other collection edit screens), attachment items include an interactive caption/title input (<input class="describe" ...>) positioned at the bottom of the attachment tile. Because the ::after overlay is absolutely positioned at bottom: 8px; left: 8px; width: calc(100% - 16px);, it sits directly on top of this caption field, partially covering the text and placeholder.

Solution

  1. Exclude attachments that have a .describe input element from the ::after overlay rule (:not(:has(.describe))).
  2. Explicitly set content: none; for .wp-core-ui .attachment:has(.describe)::after, following the same pattern established in [61862] / #64820 for thumbnails in the gallery selection strip (.wp-core-ui .media-selection .attachment::after).

How to test

  1. In the block editor, insert a Gallery block and click "Media Library".
  2. Select 2 or more images and click "Create a new gallery" to go to the "Edit gallery" screen.
  3. Observe the caption field below each image. Verify that the caption input and placeholder ("Caption...") are completely visible, easily clickable, and no longer covered by an image title overlay.
Note: See TracTickets for help on using tickets.