Tiled Gallery: Accessibility - when set to link to 'None', remove button role, and tabIndex of 0 #39925
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
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.
On a test site, ensure the full-screen Carousel option is disabled under Jetpack > Settings > Writing:
/wp-admin/admin.php?page=jetpack#/writing
Create a new post and add a Tiled Gallery block.
Ensure 'None' is set for the 'Link to' option in the sidebar:
Save and preview
If you inspect the image source for one of the Tiled Gallery images, you'll see a tabIndex of 0, and role of button:
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)
The text was updated successfully, but these errors were encountered: