ResponsiveWrapper does not correctly render images wrapped in Button #53886
Labels
[Block] Buttons
Affects the Buttons Block
[Package] Components
/packages/components
[Type] Enhancement
A suggestion for improvement.
Description
I expect to be able to pass anything to ResponsiveWrapper... not just an image tag. Something about the new aspect ratio stuff is causing images to render with zero height when wrapped in a
Button
.This worked before WordPress 6.3.
I know I can just attach an
onClick
to the image, but that's not good for accessibility. Buttons are for tapping things. If I wrap an image in a button, browsers know that this is a thing that can be pressed, and accessibility is handled.Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Environment info
WordPress 6.3
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: