Description
When opening an image in the Media Library modal view, the "Generate Alt Text" button works correctly for the first image. However, when navigating to another image using the arrow navigation within the same modal, the "Generate" button becomes unresponsive — clicking it produces no result, no loading state, and no error message.
The only workaround is to close the modal entirely and re-open the next image individually, which makes processing multiple images very tedious.
Expected behavior: The "Generate Alt Text" button should work consistently for every image when navigating between them within the modal, without requiring the modal to be closed and reopened.
Step-by-step reproduction instructions
- Go to Media Library (wp-admin → Media)
- Click on any image to open the modal view (attachment details)
- Click the "Generate" button next to "Alt Text" — it works correctly and generates alt text
- Use the right arrow at the top of the modal to navigate to the next image
- Try clicking the "Generate" button on the new image
- Nothing happens — the button does not trigger any action
- To make it work again, the modal must be closed and the image opened individually
Screenshots, screen recording, code snippet
Environment info
AI (1.0.0) — WordPress.org Contributors
AI Provider for Anthropic (1.0.3) — WordPress AI Team
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except the AI plugin.
Please confirm which theme type you used for testing.
Description
When opening an image in the Media Library modal view, the "Generate Alt Text" button works correctly for the first image. However, when navigating to another image using the arrow navigation within the same modal, the "Generate" button becomes unresponsive — clicking it produces no result, no loading state, and no error message.
The only workaround is to close the modal entirely and re-open the next image individually, which makes processing multiple images very tedious.
Expected behavior: The "Generate Alt Text" button should work consistently for every image when navigating between them within the modal, without requiring the modal to be closed and reopened.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Environment info
AI (1.0.0) — WordPress.org Contributors
AI Provider for Anthropic (1.0.3) — WordPress AI Team
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except the AI plugin.
Please confirm which theme type you used for testing.