Feature 'Embed Block caption' is not working properly. I expect the figcaption to be output as a child element of the figure, but it is currently being inserted as a sibling element after the figure instead.
Step-by-step reproduction instructions
Install Gutenberg version 19.1.0.
Open Gutenberg and paste a YouTube video URL into the visual editor.
Add a figcaption via the toolbar.
Inspect the figcaption using Chrome Dev Tools. You'll see that the figcaption is placed outside of the figure element.
Description
Feature 'Embed Block caption' is not working properly. I expect the
figcaption
to be output as a child element of thefigure
, but it is currently being inserted as a sibling element after thefigure
instead.Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
https://github.com/user-attachments/assets/6a42d3e1-4981-40d2-b89a-0524072dffea
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.