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

Empty alt="" for the Featured Image block #57893

Open
huubl opened this issue Jan 16, 2024 · 2 comments
Open

Empty alt="" for the Featured Image block #57893

huubl opened this issue Jan 16, 2024 · 2 comments
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Enhancement A suggestion for improvement.

Comments

@huubl
Copy link
Contributor

huubl commented Jan 16, 2024

What problem does this address?

In the current implementation of the Featured Image block, there is no option to leave the alt attribute empty (alt=""). This can be a problem in cases where the image is purely decorative and does not contain information that is useful to the understanding of the webpage. In these cases, an empty alt text should be provided (alt="") so screen readers can ignore the image.

What is your proposed solution?

Users should have the ability to assign an empty alt attribute when adding a Featured Image block. If the alt attribute is assigned as empty, the HTML output should reflect alt="".

@huubl huubl added the [Type] Enhancement A suggestion for improvement. label Jan 16, 2024
@jordesign jordesign added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Block] Post Featured Image Affects the Post Featured Image Block labels Jan 16, 2024
@carolinan
Copy link
Contributor

Hi
It is possible, all you need to do is remove the alt in the media library.

Remember that linked featured images are not decorative. For these links, the alt text is the link text.

@huubl
Copy link
Contributor Author

huubl commented Jan 17, 2024

Hi It is possible, all you need to do is remove the alt in the media library.

Remember that linked featured images are not decorative. For these links, the alt text is the link text.

Yes, I know. But an image can be used in different contexts and can be decorative in some of them. In such cases, it's appropriate to have an empty alt attribute. This is why the proposed feature to allow an empty alt attribute in the Featured Image block could be beneficial. It would provide more flexibility to handle different use cases and improve the overall accessibility of the site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Featured Image Affects the Post Featured Image Block [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Enhancement A suggestion for improvement.
3 participants