Improve the Gallery images alt attribute within the editor block #16886
Labels
[Block] Gallery
Affects the Gallery Block - used to display groups of images
[Feature] Media
Anything that impacts the experience of managing media
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Type] Bug
An existing feature does not function as intended
Describe the bug
Gallery images in Gallery block within the editor are typically rendered with the following markup (new lines are for better readability in this example):
The
aria-label="image 1 of 4 in gallery"
overrides thealt
attribute, making the images not recognizable by screen reader users. The only available information isimage 3 of 4 in gallery
, which doesn't help that much.To reproduce
Steps to reproduce the behavior:
image 3 of 4 in gallery
Expected behavior
The alt attribute to not be overridden
Desktop (please complete the following information):
N/A
Smartphone (please complete the following information):
N/A
Possible solution:
image 3 of 4 in gallery
is really necessary: gallery images are within list item and the number of items should be automatically announced by screen readersThe text was updated successfully, but these errors were encountered: