Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image block: Focus style not around whole image when linked #62544

Closed
krokodok opened this issue Jun 13, 2024 · 2 comments · Fixed by #62556
Closed

Image block: Focus style not around whole image when linked #62544

krokodok opened this issue Jun 13, 2024 · 2 comments · Fixed by #62556
Assignees
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

Comments

@krokodok
Copy link
Contributor

krokodok commented Jun 13, 2024

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

  1. Open a clean installation of WordPress with a block theme, e.g. on https://playground.wordpress.net/ with current WordPress 6.5.4.
  2. Insert an image block and link the image with a URL.
  3. Tab to the linked image using the keyboard in the frontend.
  4. The link's outline will not stretch around the whole image.

Screenshots, screen recording, code snippet

Backend

grafik

Frontend (with WordPress twenty-twentyfour)

grafik

Should look like this

grafik

(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

@krokodok krokodok added the [Type] Bug An existing feature does not function as intended label Jun 13, 2024
@t-hamano
Copy link
Contributor

Thanks for the report.

I tested on Windows OS, but this issue could be reproduced in the Firefox browser. What is your environment?

I also found that this issue occurs in the Media & Text block.

image

@t-hamano t-hamano added [Block] Image Affects the Image Block [Block] Media & Text Affects the Media & Text Block labels Jun 13, 2024
@krokodok
Copy link
Contributor Author

krokodok commented Jun 13, 2024

@t-hamano Sorry for leaving out these facts. I reproduced it in Firefox and Chrome on MacOS 14.5.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jun 13, 2024
@alexstine alexstine added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants