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

Decorative images, lightbox links and screenreaders #1373

Open
FayCross opened this issue Jan 16, 2025 · 1 comment
Open

Decorative images, lightbox links and screenreaders #1373

FayCross opened this issue Jan 16, 2025 · 1 comment

Comments

@FayCross
Copy link
Collaborator

Following on from a post on the forum, should we automatically prevent images without alt text from being wrapped in a link that opens the image in a lightbox? If the image is decorative only, would it ever be worth opening it in a lightbox? As Ron has said in the forum, there are reasons why allowing images to open in a lightbox is valuable so it would be a shame if people started to turn this off for whole projects because it is a confusing for decorative images.

@ronm123
Copy link
Collaborator

ronm123 commented Jan 17, 2025

@FayCross although Lilian's forum post was about decorative text and what a screen reader then reads I think it's important to be clear about these different things separately. e.g.

If the alt text is left empty because the image is decorative then the current code is correct in that the alt tag is empty and will not be read by the screen reader. But as we know there are other factors involved here:
1 in Lilian's example it wasn't a problem with empty alt text just that the lightbox link was being read
2 not all authors take the time to add alt text and unfortunately that doesn't necessarily mean the image is only decorative and/or shouldn't open in a lightbox
3 whether the image should open in a lightbox or not should be a separate decision and any solution needs to cover images added via the wizard and also the editor toolbar

I can see that we could prevent images without alt text from being wrapped in the lightbox link but I'm not sure that's the right solution. At the moment we have project wide and page specific options for enabling lightbox or not and perhaps we should have a checkbox per image in the wizard and the toolbar so that the choice is even more granular and then deliberate for each image?

@FayCross FayCross added this to the Next developer day milestone Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants