From e827f994c2cdf3dc72d3c8792cf47effcc7c5a4b Mon Sep 17 00:00:00 2001 From: Khokan Sardar Date: Tue, 9 Jun 2026 15:53:00 +0530 Subject: [PATCH] Media: Restore accessible name for media items without a title. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/js/media/views/attachment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/media/views/attachment.js b/src/js/media/views/attachment.js index 4ecda8347b00a..755c7aa19eb21 100644 --- a/src/js/media/views/attachment.js +++ b/src/js/media/views/attachment.js @@ -21,7 +21,7 @@ Attachment = View.extend(/** @lends wp.media.view.Attachment.prototype */{ return { 'tabIndex': 0, 'role': 'checkbox', - 'aria-label': this.model.get( 'title' ) || wp.i18n.__( 'uploading…' ), + 'aria-label': this.model.get( 'title' ) || ( this.model.get( 'uploading' ) ? wp.i18n.__( 'uploading…' ) : wp.i18n.__( '(no title)' ) ), 'aria-checked': false, 'data-id': this.model.get( 'id' ) };