﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	focuses
65086	Add action hooks to media modal attachment details templates for field extensibility	kaavyaiyer		"Since WP 7.0 ships with a built-in AI client, there is a need for AI-powered features like alt text generation to be able to place controls (e.g., a ""Generate"" button) directly next to the fields they act on within the media modal.

Currently, {{{wp-includes/media-template.php}}} does not provide any hooks inside the attachment details templates where fields like Alternative Text are rendered. This leaves JavaScript DOM manipulation as a workaround to place controls directly next to existing fields.

The first concrete use case is the [https://github.com/WordPress/ai] alt text generation experiment, which needs a ""Generate"" button next to the Alternative Text textarea. See: [https://github.com/WordPress/ai/issues/425 WordPress/ai#425] for the original discussion.

== Proposed Solution
Add action hooks inside the two attachment details Backbone templates in {{{media-template.php}}}

=== Extending to other fields

Beyond the media modal, similar hooks would benefit other areas of the admin where AI features need to place controls next to existing fields for title, image, caption generation, etc. This ticket focuses on the media modal as the starting point.
"	enhancement	new	normal	7.1	Media		normal		has-patch		
