-
Notifications
You must be signed in to change notification settings - Fork 6
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
[AI Help] Question: do all images need alt text? #6
Comments
First of all, let me thank you for this issue, because it surfaced two issue reporting problems when you have a chat with multiple questions. I have applied a fix that should land soon. I will triage this as a bug for now, and we might want to exclude the MDN meta documentation from AI Help's knowledge base to resolve it, even if this means certain questions about MDN itself won't be answerable anymore (it's an interesting, but not necessarily important use case). We will update this issue when we address the issue. |
@astearns Thanks again for reporting this issue. 👍 As we're working on an iteration, I would like to share with you what AI Help 2.0 might answer. Can you please check how the following answers perform with regard to the issue you reported above? 🙏 should I use tailwind?
does every element need an ARIA role?
do all images need alt text?
|
Just looking at the alt answer (again, I am still concerned with the “might answer” part), it’s a bit weird that it links to |
Thank you as well for the review of these answers. Re. the "might answer" part, there are two aspects to it:
As for the second point, here's what another answer to the last question looks like. It's not identical, but very similar to the answer posted above (and it doesn't have the img article as explicit context, so it uses the old anchor
|
The differences in the answers are still a concern. What if the person querying was thinking specifically of an image used as a button? The first answer helps them, the second does not. Conversely, if they were thinking specifically about image maps the second would be helpful but the first would not be. I don’t think MDN is an appropriate place to serve up direct LLM output. |
What is the issue with the answer?
The summarized answer to “do all images need alt text” mashes up general authoring advice with specific requirements about MDN content. So the overall answer is incoherent (should have an alt attribute, it can be empty, but a non-empty attribute is required).
It’s really only the first sentences in the first two paragraphs that are relevant to the question. The rest of the generated text just makes the answer unclear.
How would you categorize this issue?
What did you ask?
What did AI Help answer?
According to the MDN documentation, every image should have an
alt
attribute. The purpose of thealt
attribute is to provide alternative text that describes the image in a way that is helpful to users who can read the rest of the content but can't see the image. Thealt
text should be short and provide all the relevant information the image conveys. When writing thealt
text, you should think about the valuable information of the image and how you would relay that information to someone who can't load images.However, it is important to note that purely decorative images should have an empty
alt
attribute. On the other hand, images added to MDN documentation should have a purpose and therefore require a non-empty-string description. It is recommended to avoid describing the image in too much detail, as the surrounding text may already provide relevant information. Additionally, screenshots should focus on what you learn from the image rather than detailing its contents, and unnecessary information should be omitted.Here is an example of the syntax for adding an
alt
attribute to an image in HTML:Remember, the
alt
attribute is important for accessibility and should be used appropriately to ensure that all users can understand the content of the image.What MDN pages did AI Help consult?
The text was updated successfully, but these errors were encountered: