-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Add a11y alt attribute explainer to html img element #36067
Conversation
This adds some explanation on how to choose a good alt attribute for an image and what is meant by the *Don't* and *Do* examples already present. Also see #36050 for context.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Preview URLs (comment last updated: 2024-10-15 19:25:25) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @JohannesBeranek, and thank you so much for your contribution to MDN. I think your suggestions are reasonable, and the language was pretty good. I have got a couple of suggestions for you to consider. My text suggestion is mainly to break up the long run-on sentence you added, and add macros to create links to the element reference pages.
Co-authored-by: Chris Mills <[email protected]>
@chrisdavidmills is this better now? Thanks for taking the time! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @JohannesBeranek, and thank you for your continued work on this. I have a couple more text suggestions for you. If you are happy with these, then I think we can get it merged. Let me know what you think!
Co-authored-by: Chris Mills <[email protected]>
Co-authored-by: Chris Mills <[email protected]>
@chrisdavidmills happy with the suggestions, commited them! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Approving!
Thanks again @JohannesBeranek. Your contribution is much appreciated.
Description
This adds some explanation on how to choose a good alt attribute for an image and what is meant by the Don't and Do examples already present.
Motivation
The existing example can easily be interpreted as "write down what you see in the image", as there is not much context given as to why or how the alt text was chosen in the Do example.
Additional details
I don't have any experience on committing to MDN and I am not a native speaker, but I've got some experience fighting usability issues. While it's hard to improve on the already existing documentation in a short and concise way, and actually adding anything meaningful that does not go too deep into the topic (there are already references to pages about a11y in that section), I hope I can provide a good base which, with the help of some native speakers, can help improve MDN.
Related issues and pull requests
Fix #36050