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

Alt decision tree document for developers #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mattbegent
Copy link
Contributor

I've put together a first draft of a document intended to be a guide for developers about how they add alt text. It's inspired by https://www.w3.org/WAI/tutorials/images/decision-tree/.

Let me know what you think.

@bkclerke
Copy link

bkclerke commented Oct 31, 2024

@mattbegent could we recommend on the no options that the role="presentation" be added to images. Developers can figure out how to implement this when a media picker is at use. For content authorship purposes with the alt text on images in the RTE, the editor will need to take ownership of the image purpose and alt text.

Also, I thought the alt="" tag was required on images regardless. The question is whether to put text in the alt tag or not. I think the last item in the list saying put the alt="" tag but leave it empty threw me off and suggests that the alt tag is not required on the image in other instances. I don't believe that to be the case (I can stand to learn some things but that is my understanding of the requirements).

@mattbegent
Copy link
Contributor Author

@mattbegent could we recommend on the no options that the role="presentation" be added to images. Developers can figure out how to implement this when a media picker is at use. For content authorship purposes with the alt text on images in the RTE, the editor will need to take ownership of the image purpose and alt text.

Also, I thought the alt="" tag was required on images regardless. The question is whether to put text in the alt tag or not. I think the last item in the list saying put the alt="" tag but leave it empty threw me off and suggests that the alt tag is not required on the image in other instances. I don't believe that to be the case (I can stand to learn some things but that is my understanding of the requirements).

Hi @bkclerke , thanks for taking at look at this. It is my understanding that you don't really need role="presentation" on decorative images and an empty alt attribute is enough for these types of images to be ignored by assitive technologies. See https://www.w3.org/WAI/tutorials/images/decorative/.

For for the alt attribute, yes this is required by all images. This is meant to be covered by rule two at the begining "If no alt text is provided by the user for an image, output an empty alt attribute on the image, so the image can be ignored by assistive technologies." and by a number of points in the decision tree. However, if you think this is not clear enough could you provide a suggestion?

Thanks again for taking a look 😄

@bkclerke
Copy link

bkclerke commented Nov 8, 2024

@mattbegent I made a couple updates to the formatting. It sounds good though, thank you for putting it together! :)

@MMasey
Copy link
Collaborator

MMasey commented Nov 12, 2024

This looks great @mattbegent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants