Image block: Focus style not around whole image when linked #62544
Labels
[Block] Image
Affects the Image Block
[Block] Media & Text
Affects the Media & Text Block
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
When the image block is linked the focus style for the link does not stretch around the whole image. This happens because both
a
(anchor) andimg
(image) tags havedisplay: inline
by default.Step-by-step reproduction instructions
6.5.4
.Screenshots, screen recording, code snippet
Backend
Frontend (with WordPress twenty-twentyfour)
Should look like this
(The outline should also have a second color or whitespace towards the image, but that's a problem of the twenty-twentyfour theme focus style and not the same issue as the stretching around the anchor.)
Environment info
Firefox 126.0.1 & Chrome 125.0.6422.142
MacOS 14.5
WordPress 6.5.4 on Playground
No special Gutenberg version installed
I could also recreate it with Gutenberg at commit ee30a87
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: