开发者

Is it ok to repeat the same text in alt & title attributes for non-link <img> tags (e.g. for screen reader users)?

<img src="young-girl-in-red-gown.jpg" 
     alt="young girl in red gown" 
     title="Young girl in red开发者_运维知识库 gown"/>

Is my above example a good example? Should it be always like this?

In above example I used a file name, alt text and title text that are almost the same.

  • Is it ok to use same text for alt and title even if it's not a link, or can this repetition can create problems for screen reader? (I'm repeating the text because FireFox doesn't show alt as a tooltip, and the client wants a tooltip.)
  • Should we use title with image if the image is not in a link?
  • Should alt and title be different always?
  • Do screen readers speak all these attributes for images?
    1. Image file name
    2. alt text
    3. title text
  • Should I always use a descriptive image file name?


I use the Jaws screen reader and having both alt and title set isn't an issue. Jaws reads the alt tag by default if present and ignores the title unless specifically told to read it. I can't say what other screen readers do though.


No idea about screen reader users, but it bugs the heck out of me.

I doubt search engines care.


See:

The Importance of Images On Your Site

ALT vs. TITLE

The alt and title attribute are there for different things, they are not the same, they won't irritate anything, they are made to make things much more clear to both humans as well as search engines.

Using alt tag is good for standard-compliant, validated html and it is also equally respected by search engines.


I dont think that this should cause a problem unless you are stuffing keywords into that to increase keyword density on the pages. otherwise it is alright to have it the way your client wants.


It used to be that alt was how you created mouseover tooltips over images. Luckily, with the advent of title, this is not really needed.

If you wish to provide such a tooltip today, over either a text link or an image, title is the thing to use.

alt is what you use to make your images "visible" as text to browser technology that doesn't actually support images (such as screen readers, or text-based browsers). Thus, it doesn't have any meaning in the context of text links - since text in those is already, well, text.

Search engines' algorithms are a bit of mystery. If I had to guess, I would say that for web searches, there is so much signals available through text links, that there is no need to rely on titles and alts. Image search may be a different story. It's much harder to get information about what's contained in a picture and correlate it to textual keywords. Therefore, these attributes may be given more weight in that context.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜