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

Tiled Gallery: Accessibility - when set to link to 'None', remove button role, and tabIndex of 0 #39925

Closed
coder-karen opened this issue Oct 28, 2024 · 0 comments · Fixed by #40241
Assignees
Labels
[Block] Tiled Gallery [Feature] Tiled Gallery A different way to display image galleries on your site, in different organizations and shapes. [Focus] Accessibility Improving usability for all users (a11y) [Pri] Normal

Comments

@coder-karen
Copy link
Contributor

Issue

A Tiled Gallery set to link to 'None' defines a role of button and tabIndex of 0. Both clicking on it and tabbing to it then pressing enter result in no action being taken, which is (I would assume) expected. It appears in this case that the role and tabIndex should then be removed.

How to reproduce

This was tested on self-hosted and WoA.

  1. On a test site, ensure the full-screen Carousel option is disabled under Jetpack > Settings > Writing: /wp-admin/admin.php?page=jetpack#/writing

  2. Create a new post and add a Tiled Gallery block.

  3. Ensure 'None' is set for the 'Link to' option in the sidebar:
    Image

  4. Save and preview

  5. If you inspect the image source for one of the Tiled Gallery images, you'll see a tabIndex of 0, and role of button:

Image

  1. Click on any of the images - you'll see the image highlighted but no action taken
  2. Similarly, tab onto one of the images and press enter. You'll see the image highlighted, but no action taken.

What should happen

I would assume that since no action should be taken, the role and tabIndex should not be set as they are.

Related conversations

#39913 (review)

@coder-karen coder-karen added [Block] Tiled Gallery [Focus] Accessibility Improving usability for all users (a11y) labels Oct 28, 2024
@jeherve jeherve added the [Feature] Tiled Gallery A different way to display image galleries on your site, in different organizations and shapes. label Oct 29, 2024
@coder-karen coder-karen self-assigned this Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Tiled Gallery [Feature] Tiled Gallery A different way to display image galleries on your site, in different organizations and shapes. [Focus] Accessibility Improving usability for all users (a11y) [Pri] Normal
Projects
None yet
2 participants