Opened 6 weeks ago
Last modified 39 hours ago
#65438 accepted defect (bug)
All images without a title now show as "uploading..." in the Media Library grid view
| Reported by: | jamieburchell | Owned by: | joedolson |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.0.3 |
| Component: | Media | Version: | 7.0 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
This is a follow-up to #64883.
All images without a title now show as "uploading..." in the Media Library grid view. I routinely remove the title attributes in favour of alt attributes since I do not want tooltips on hover of images.
Change History (17)
This ticket was mentioned in PR #12136 on WordPress/wordpress-develop by @khokansardar.
6 weeks ago
#2
- Keywords has-patch added; needs-patch removed
Saved attachments without a title were being announced as "uploading…" in the Media Library grid view. This restores a meaningful accessible name for them while keeping the upload-progress naming added in [62104].
What the problem was:
- [62104] (follow-up to #64883) set the grid item
aria-labeltotitle || 'uploading…'so in-progress uploads get an accessible name. - That fallback also matched any saved attachment with no title, so every titleless image was announced as "uploading…".
What the fix does:
- Limits the "uploading…" fallback to items that are actually uploading.
- Falls back to the existing "(no title)" string for saved attachments that have no title.
Approach and why:
- A simple swap of "uploading…" → "(no title)" (per comment:1) would re-break #64883, since real uploads have no title yet. Gating on the model's
uploadingflag satisfies both tickets. - Both "uploading…" and "(no title)" already exist as translatable core strings, so no new strings are introduced.
Testing instructions:
- In the Media Library, ensure you have an image with no Title set.
- Open the grid view (Media → Library, grid mode) and inspect the image tile: its
<li class="attachment">aria-labelshould read "(no title)" (verify with a screen reader or the browser a11y inspector), not "uploading…". - Upload a new file and, while it is uploading, confirm its tile's
aria-labelstill reads "uploading…". - Confirm an image that has a title is unchanged (announced by its title).
Trac ticket: https://core.trac.wordpress.org/ticket/65438
## Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 4.8
Used for: Ticket and regression analysis (tracing the cause to [62104]) and drafting the one-line fix. All changes were reviewed, validated against the codebase, and are taken responsibility for by me.
#3
@
6 weeks ago
It definitely makes sense to have better handling for untitled images; although I'd like to also follow up on @jamieburchell's comment about the use of the title.
Can you be more specific about the cases where you're seeing a title attribute appear on your images? This is not something that should ever happen in core; the purpose of the title field is to provide a post name, used only on attachment pages or in the admin as a way to label images.
If there's a plugin or theme that's using those, that's not something we can do anything about, but if there's a core application that is using them, I want to be aware of it so that I can remove it.
Which is to say, in *core* what you're doing by removing the title field shouldn't have any meaningful impact on the front-end of the site, but will make a number of things more difficult on the back-end.
#4
@
6 weeks ago
- Milestone Awaiting Review → 7.0.1
- Owner set to
- Status new → accepted
This is a bug caused in 7.0, and worth fixing in 7.0.1, though it should be rare in practical application.
#5
@
6 weeks ago
Regarding the use of the title as a title attribute for the image - I have not tested this recently with the plugins and themes I use, but this was my reason for removing them historically.
Certainly, given its proximity to the alt field, I wouldn't blame anyone for interpreting and implementing it as the title attribute of an image. A quick Google search brings up examples of this use case (rightly or wrongly):
B.Title Attribute (title=”…”
As we mentioned earlier, title attributes are added automatically and is almost always the file name minus the file extension. The only real purpose for this attribute is to present a hover tooltip for those who can read. Screen readers will ignore this value completely and so it is unnecessay and redundant. In most cases, we would recommend removing this value to avoid revealing dodgy file names.
B.When To Use Title Text
Use of title text is to be avoided altogether. If this is pre-filled with the file name, remove it. Some say it is useful to search for the image in the image library later but we find that even without the title attribute, we can still find the same image as the search also looks at the file name itself. So it would be good practice to use meaningful names for your files. If you really must use the Title text, this would only serve to add a hover tooltip to sighted users.
https://victorduse.com/blog/how-to-disable-automatic-image-title-generation-in-wordpress/
Certain WordPress themes (like Divi) and web browsers display image titles as tooltips when users hover their cursor over an image. Automatic image titles, often derived from filenames, can be cryptic and uninformative. This can confuse visitors and create a poor user experience. You could hide image titles on hover in WordPress using custom code or plugins, but why not just remove the source of the problem instead?
https://mor10.com/power-of-wordpress-image-metadata/
In previous incarnations of WordPress the Title field was mapped to the optional HTML title attribute. This resulted in the title of the image appearing as a tooltip any time a mouse hovered over it.
#6
@
6 weeks ago
Historically, it was definitely an issue; the primary usage of this was removed in 3.5, although other uses have been cleaned up and removed gradually over the years since then.
#7
@
6 weeks ago
Patch correctly addresses the root cause — gating the "uploading..." fallback to items actually uploading, and using "(no title)" for saved attachments without a title. Both strings already exist in core, no new strings introduced.
#8
@
6 weeks ago
We're on the right track. There is one point, however, on which I must disagree, and that is:
A simple swap of "uploading…" → "(no title)" would re-break #64883, since real uploads have no title yet.
The problem would be solved by simply displaying ‘(no title)’ during the upload, without breaking anything.
Just for the record.
@ankitkumarshah commented on PR #12136:
6 weeks ago
#9
Hi @itzmekhokan,
Tested this PR and can see that it successfully resolves the issue.
I verified that media items without a title are now listed as "(no title)" instead of "uploading…" in the Media Library grid view. Media items with titles remain unaffected.
Screenshot attached for reference.
#11
@
4 weeks ago
@Chillifish that is because of
"When uploading a file, the placeholder containing the progress bar has a white bar at the bottom.",
see #64883.
@masteradhoc commented on PR #12136:
4 weeks ago
#12
Thanks for the PR @itzmekhokan. I can confirm this PR works as expected and the results are as @Infinite-Null showed them in the comment above. LGTM
This ticket was mentioned in Slack in #core by cbravobernal. View the logs.
3 weeks ago
@masteradhoc commented on PR #12136:
3 weeks ago
#14
The Adjustment didnt work out for me. When the upload finished and the media library page is refreshed its again saying "uploading..."
#15
@
3 weeks ago
- Milestone 7.0.1 → 7.0.2
As the RC for WP 7.0.1 is expected to land tomorrow we'll have to punt this to 7.0.2.
@khokansardar commented on PR #12136:
3 weeks ago
#16
The Adjustment didnt work out for me. When the upload finished and the media library page is refreshed its again saying "uploading..."
| 'uploading…' line, which is why a refresh brings it back. |
Please rebuild after checking out the branch:
npm install grunt build
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Uh, didn't think of that.
The most practical solution is probably simply to replace
uploading…with(no title)(available core string).btw there is a discrepancy with videos. For videos without a title, the file name is displayed in the grid view.
@joedolson ?