WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.49k stars 4.18k forks source link

Embed blocks: figcaption inserted via toolbar not nested within figure element #64960

Closed frkly closed 1 month ago

frkly commented 2 months ago

Description

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

  1. Install Gutenberg version 19.1.0.
  2. Open Gutenberg and paste a YouTube video URL into the visual editor.
  3. Add a figcaption via the toolbar.
  4. Inspect the figcaption using Chrome Dev Tools. You'll see that the figcaption is placed outside of the figure element. 8c22f489ab395e97286c6b88a111ff47

Screenshots, screen recording, code snippet

https://github.com/user-attachments/assets/6a42d3e1-4981-40d2-b89a-0524072dffea

Environment info

  1. Gutenberg version 19.1.0
  2. WordPress 6.6.1
  3. Chrome 128.0.6613.86(Official Build)
  4. Windows 11

Please confirm that you have searched existing issues in the repo.

Please confirm that you have tested with all plugins deactivated except Gutenberg.

hbhalodia commented 2 months ago

Hi @frkly @t-hamano, I have raised the PR to fix the same - https://github.com/WordPress/gutenberg/pull/64970.

Thank You,

t-hamano commented 1 month ago

Fixed by https://github.com/WordPress/gutenberg/pull/64970