Media: Restore accessible name for media items without a title#12136
Media: Restore accessible name for media items without a title#12136itzmekhokan wants to merge 1 commit into
Conversation
Changeset [62104] added an "uploading…" fallback for the grid item `aria-label` so that in-progress uploads, which have no title yet, get an accessible name. That fallback also matched saved attachments that simply have no title, so every titleless image was announced as "uploading…" in the Media Library grid view. Limit the "uploading…" fallback to items that are actually uploading, and fall back to the existing "(no title)" string for saved attachments without a title. Both strings already exist in core, so no new translatable strings are introduced. Follow-up to [62104]. Fixes #65438. See #64883.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
Hi @itzmekhokan, 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. |


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:
aria-labeltotitle || 'uploading…'so in-progress uploads get an accessible name.What the fix does:
Approach and why:
uploadingflag satisfies both tickets.Testing instructions:
<li class="attachment">aria-labelshould read "(no title)" (verify with a screen reader or the browser a11y inspector), not "uploading…".aria-labelstill reads "uploading…".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.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.