#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
- Upload a few images, and give some of them a caption.
- In the block editor, insert a Gallery block and click "Media Library".
- Select the images and click "Create a new gallery" to go to the "Edit gallery" screen.
- Look at the caption field below each image.
Attachments (2)
Change History (4)
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
- Exclude attachments that have a
.describeinput element from the::afteroverlay rule (:not(:has(.describe))). - 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
- In the block editor, insert a Gallery block and click "Media Library".
- Select 2 or more images and click "Create a new gallery" to go to the "Edit gallery" screen.
- 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Duplicate of #66076.
Thanks for reporting! This issue is already being tracked in #60076