-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
[Block] ImageAffects the Image BlockAffects the Image Block[Block] Media & TextAffects the Media & Text BlockAffects the Media & Text Block[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).Changes that impact accessibility and need corresponding review (e.g. markup changes).[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
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) and img (image) tags have display: inline by default.
Step-by-step reproduction instructions
- Open a clean installation of WordPress with a block theme, e.g. on https://playground.wordpress.net/ with current WordPress
6.5.4. - Insert an image block and link the image with a URL.
- Tab to the linked image using the keyboard in the frontend.
- The link's outline will not stretch around the whole image.
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
Metadata
Metadata
Assignees
Labels
[Block] ImageAffects the Image BlockAffects the Image Block[Block] Media & TextAffects the Media & Text BlockAffects the Media & Text Block[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).Changes that impact accessibility and need corresponding review (e.g. markup changes).[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended