Make WordPress Core

Opened 4 weeks ago

Last modified 3 weeks ago

#65874 new feature request

Alt Text updating during uploading

Reported by: cclambie Owned by:
Priority: normal Milestone: Awaiting Review
Component: Media Version:
Severity: normal Keywords:
Cc: Focuses: ui, accessibility

Description

I would love to write the alt text into the box whilst the image is uploading.

screen shot showing that the box is greyed out whilst uploading:
https://craiglambie.com/wp-content/uploads/2026/08/wp-upload-alt.png

discussion (here)https://wordpress.org/support/topic/fr-alt-text-input-field-whilst-uploading/#post-18992164

The idea is that the "alt-text" box would be available to type into as the media uploads - making the workflow easier, and the likeliness of adding alt text higher.

Change History (5)

#1 @sabernhardt
4 weeks ago

  • Version trunk

Related: #58783 (Data was lost when the upload process completed.)

#2 @abcd95
4 weeks ago

The fields are readonly for a deliberate reason: when upload completes, fileUploaded() does a full model.set(response.data) merge that wipes any client-side input. This was the exact bug fixed in #58783 (WP 6.5) - disabling editing was the chosen fix. So this isn't an oversight, it's a tradeoff.

The real question is: should we enable editing without re-introducing data loss?

#3 @cclambie
4 weeks ago

Thanks for pointing out this was a fix to a problem - data loss is worse than this.

I don't understand why the data couldn't be held in a cache/ cookie until the image uploads?
Or
DB record is created based on the filename.

eg.
On pressing Upload button
Usual f = e.target.files[0]
Then filter on type
Then f.name sent to the Db (duplication check/ in case of partial /failed upload)
If duplicate - overwrite, or reupload option
If not - Db entry created
Then editable fields - with async background uploading
Then a submit button to update the Db - no refresh on the page on_upload as it has now

Sorry I can't get my head into this code to figure it out, but I presume it is somewhere in media-upload.php

This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.


3 weeks ago

#5 @joedolson
3 weeks ago

This probably merits some exploration, but I remember from looking at it during 6.5 that it was very much non-trivial.

Note: See TracTickets for help on using tickets.