Should i repeat person name in alt text of <img> if name is already in source under image?
Asked Answered
C

7

10

if I'm already having person name under/over image then should i use same name in ALT text?

alt text http://easycaptures.com/fs/uploaded/227/6990285751.jpg

<p><img width="125" height="157" alt="George Washington" 
src="media/gw.jpg"><span>George Washington</span><p>


<p><span>George Washington</span>
<img width="125" height="157" alt="George Washington" src="media/gw.jpg"><p>

Should i repeat <span> in alt in both condition ? image has no link.

Curator answered 27/1, 2010 at 5:7 Comment(3)
No need for a separate answer, but I'd like to point out jensgram's comment to kervin's answer, since it reflects perfectly my own opinion.Huba
@Huba Thank you. I did, however, post a separate answer :)Graphics
@jensgram: I meant, no need for another answer from me. So, I don't object ;-)Huba
F
13

Yes.

ALT Text is important for screen readers and such. Text 'nearby' to an image doesn't have much meaning to these programs.

Some more information from W3C on the subject.

Fannie answered 27/1, 2010 at 5:10 Comment(8)
but screen reader will repeat same name in ALT="person name" and <p>person name?Curator
The screen reader can let the user know that there is a image on the page and it pertains to 'whatever is in ALT'. So the user know has a little knowledge about what they're missing. It will then continue with the page. Without that ALT, the user would never know what was in the image.Fannie
+1 Agree. However, I would use the ALT attribute to provide a description of the image, e.g. "Portrait of George Washington, oil on canvas, circa 1790".Graphics
I disagree. And so does the W3C: "Do not specify irrelevant alternate text when including images intended to format a page, for instance, alt=”red ball” would be inappropriate for an image that adds a red ball for decorating a heading or paragraph. In such cases, the alternate text should be the empty string (”")." "Red Ball" in this case "George Washington"Ralaigh
@Nils: It is not irrelevant in W3C's terms. The image here does matter and is a necessary component to understand the content. The spec refers to cases, where the image is merely decoration.Huba
@Nils Riedermann "... images intended to format a page ...". This is not the case - at least as far as I understood the question.Graphics
@jensgram: I was up to write exactly this ('...as an description...') as an answer. Good you pointed it out.Huba
Updated my answer. I think i got misunderstood. Sorry for that.Ralaigh
G
5

No ... and yes!

  • No, I my opinion you should not just repeat the text.
  • However, you should see the ALT attribute as an opportunity to provide a (short) description of the image, e.g. "Portrait of George Washington, oil on canvas, circa 1790".

It this case the image does not only serve as page formatting. Instead, it is an information-carrying element. Users who cannot see the information (e.g. screen readers) should at least have a chance to know what they're missing.

Graphics answered 28/1, 2010 at 9:49 Comment(0)
T
3

No. Duplicate content is unhelpful. If an image merely illustrates something which already exists in the normal text content, it should have a blank alt attribute

As a useful test, use the Lynx browser to look at the page. If it looks stupid, the alt text is wrong.

Here is how it renders if you duplicate the alt text (copy/pasted from your example):

    George Washington George Washington
Tervalent answered 27/1, 2010 at 13:37 Comment(0)
R
3

No. Alt Text is shown as an alternative for the image when it cannot be shown.

Here is an extract from the specification that is quite straight forward:

  • Do not specify irrelevant alternate text when including images intended
    to format a page, for instance,
    alt=”red ball” would be inappropriate for an image that adds a red ball for decorating a heading or paragraph. In such cases, the alternate text should be the empty string (”"). Authors are in any case advised to avoid using
    images to format pages; style sheets
    should be used instead.
  • Do not specify meaningless alternate text (e.g., “dummy text”). Not only will this frustrate users, it will slow down user agents that must convert text to speech or braille output. play terminals, users whose browsers don’t support forms, visually impaired users, those who use speech synthesizers, those who have configured their graphical user
    agents not to display images, etc.

So it says pretty clear not to repeat. "Red Ball" in the first case can be replaced by "George Washington".

Here is a good article how to use the alt-attribute properly: Alt attributes

EDIT: Ok i think i got misunderstood. I did not say that he mustn't use an alt-attribute here.

We are talkin about screen readers and accessibilty here, right? I agree the image is important to us. But is it to blind people? Or is it just decoration for the text?

Remember the question was wether to repeat the name in the alt attribute. And i say "No". When images are not shown, the alt-text is displayed. I'd propably do it this way:

<p><img src="george.jpg" alt="Image of " />George Washington</p>

The alt-Attribute is the alternative for when the image is not shown and not a description (we have description for this).

Ralaigh answered 28/1, 2010 at 9:30 Comment(3)
-1 This question is not about whether to use ALT text on "images intended to format a page". The image of George Washington is part of the information on the page and the ALT text gives the author an opportunity to describe what some viewers do not see.Graphics
I updated my answer and made my point clearer, i hope. Maybe you can remove the downvote now? ;)Ralaigh
Indeed. (filler to reach 15 chars)Graphics
O
1

Wouldn't hurt -- otherwise the screenreader user might be left to wonder if the image is in fact that of the person whose name comes next.

Ointment answered 27/1, 2010 at 5:11 Comment(0)
D
1

This info pertains to Jaws for windows but probably applys to other screen readers as well. Always put information in an alt tag. How jaws recognizes graphics is fairly customizable, you can have only graphics with alt tags spoken, graphics recognized by mouse over, title attribute, etc. In general with the default configuration alt tags will be spoken and any other information will be ignored. If an alt tag isn't available then the screen reader will do it's best to read the graphic but this is problamatic.

Devonian answered 27/1, 2010 at 13:18 Comment(1)
but if alt text is not defined in image then screen will read text which is after the imageCurator
C
0

I am going for alt="" here.

Please check this article that provide a very nice examples: http://webaim.org/techniques/alttext/

Quoting from that article:


The alt attribute should typically:

  • Be accurate and equivalent in presenting the same content and function of the image.

  • Be succinct. This means the correct content (if there is content) and function (if there is a function) of the image should be presented as succinctly as is appropriate. Typically no more than a few words are necessary, though rarely a short sentence or two may be appropriate.

  • NOT be redundant or provide the same information as text within the context of the image.

  • NOT use the phrases "image of ..." or "graphic of ..." to describe the image. It usually apparent to the user that it is an image. And if the image is conveying content, it is typically not necessary that the user know that it is an image that is conveying the content, as opposed to text. If the fact that an image is a photograph or illustration, etc. is important content, it may be useful to include this in alternative text.

Cofsky answered 14/3, 2017 at 16:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.