-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 accessibility improvements #42057
Comments
To clarify: There is a semantic association; a linked image is the accessible name for the link. The problem here is that if an image is linked, and has no alt attribute, then the link has no name. If an image has a caption, but no alt attribute, we can name the link by associating the caption with the link. If we're not going to implement a mechanism to enforce alt attributes on linked images, then this is the closest we can get to solving that accessibility issue. |
A simpler way would be to add the caption to the alt attribute if the alt is empty, but if you think it should use |
Semantically, it's more accurate to make the relationship between two things more consistent; and won't require as much duplication of code. I'd still go with the |
Hey @glendaviesnz It would be good to get some movement here. I came across this issue as it had been added to an Image Tracking issue I made quite a while ago. |
What problem does this address?
Currently if the Image does not have an alt tag, but does have a caption there is no semantic link between the image and caption in order for screen readers, etc. to make use of it.
Also, if an image is linked there is no semantic association between the link and image.
What is your proposed solution?
Use an aria-describedby to point to the existing caption if there is a caption. If there is no labeling information at all, we should not insert any; we just need to ensure that if there is labeling information available, it should be associated with the image, or the link if the image is linked.
The text was updated successfully, but these errors were encountered: