I will try to improve on that, thanks author!
I will try to improve on that, thanks author!
Some tips:
- blank alt text is better than no alt text: alt=““ should be fine if the image is pure decoration
- if a photo repeats some text next to it (such as an avatar image beside a user name), it could also be blank, or “User Name’s photo”
- when a company logo links to the home page, an alt text of “Back to hone page” is probably more useful than “Company logo”
I've always used title in the anchor tag for that rather than the image alt text (title="back to the home page" in the anchor; and then alt="Company logo" in the img tag). That way you're properly describing what the image is and also providing information on where the associated link goes.
Can anyone here with experience with screen readers clarify if that's an effective approach?
As far as I know, screen readers don't read the title tag by themselves, though users can request it. So your approach works. And I think it is also has nicer semantics.
Personally, I prefer to use a text link with the company name, then move the text out with css and add the logo as a background image. This also works great in text browsers of course, the company/site name just becomes the h1 of the page.
However, I think it’s valuable to ask yourself “why does a non-visual user need to know the company logo is here?”.
never thought of it this way, but this makes sense. Thanks.
Is "user uploaded photo" good enough for example? The best would of course be to analyze the contents of the photo but that is simply not realistic for the stuff I work on.
What are the images for? Do they have text accompanying them? Are there themes to the images? Can you convey the same meaning and intent another way? Can you educate your users to help you out?
The answers to these questions should guide your solutions to access requirements.
Alt text isn’t only about providing a description of an image, it’s one tool in a toolbox to improve access to information.