Links and accessibility

C

Chris Beall

Consider the following HTML fragment:

<a href="one/html"><img src="http:some.url" alt=""><br>One</a>

Both the image and the text label link to the same place. The alt
keyword is present to pacify the W3C HTML 4.01 strict validator, but is
empty, which Bobby objects to.
It seems to me that if I code alt="One", a screen reader would reach the
link and say, "One One", which is confusing, rather than just "One"
which isn't (assuming 'One' is a more meaningful label).

Assuming that my intent is to give the page the best possible
accessibility rather than to obtain Bobby certification, which is the
best approach?

Chris Beall
 
N

nice.guy.nige

Consider the following HTML fragment:

<a href="one/html"><img src="http:some.url" alt=""><br>One</a>

Both the image and the text label link to the same place. The alt
keyword is present to pacify the W3C HTML 4.01 strict validator, but
is empty, which Bobby objects to.
It seems to me that if I code alt="One", a screen reader would reach
the link and say, "One One", which is confusing, rather than just
"One" which isn't (assuming 'One' is a more meaningful label).

Assuming that my intent is to give the page the best possible
accessibility rather than to obtain Bobby certification, which is the
best approach?

The alt attribute is there to provide a textual alternative to the image.
That is what it is there for. If the image is a number '1', then let the
user know that, otherwise they will just be informed by their user agent
that there is an image there, but they don't know what it is.

Cheers,
Nige

--
Nigel Moss.

Email address is not valid. (e-mail address removed). Take the dog out!
http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
"How strange the change from major to minor..."
 
D

DU

Chris said:
Consider the following HTML fragment:

<a href="one/html"><img src="http:some.url" alt=""><br>One</a>

Both the image and the text label link to the same place. The alt
keyword is present to pacify the W3C HTML 4.01 strict validator, but is
empty, which Bobby objects to.
It seems to me that if I code alt="One", a screen reader would reach the
link and say, "One One", which is confusing, rather than just "One"
which isn't (assuming 'One' is a more meaningful label).

Assuming that my intent is to give the page the best possible
accessibility rather than to obtain Bobby certification, which is the
best approach?

Chris Beall

Go to Delorie's Lynx viewer.
http://www.delorie.com/web/lynxview.html
and then examine your page as if you were using a screen reader. That's
the best option available for you here. Bobby recommends, gives you
hints, checkpoints, etc... The alt attribute must be a valid, sensible
text alternative to the image: no more, no less. And in some cases, I
personally do not see such text alternative.

DU
 
B

Bill Mason

Both the image and the text label link to the same place. The alt
keyword is present to pacify the W3C HTML 4.01 strict validator, but is
empty, which Bobby objects to.

As others have already pointed out how to assess whether or not you
need an ALT, I'll just stick 2 cents in to say that Bobby flagging any
instance of alt="" as an error is a bunch of crap. It's a perfectly
valid thing to do if warranted by the page's/image's context.

Bill Mason
Accessible Internet
http://www.accessibleinter.net/
 
I

Isofarro

nice.guy.nige said:
The alt attribute is there to provide a textual alternative to the image.
That is what it is there for. If the image is a number '1', then let the
user know that, otherwise they will just be informed by their user agent
that there is an image there, but they don't know what it is.

If the alternative text for the image is what is already visible, then
alt="" is the correct way to go. Duplicating already accessible content
isn't good.

This is a case where Bobby is wrong to complain about empty alt attributes.
 
I

Isofarro

EightNineThree said:
The alt attribute is intended to supply a text alternative for those who
are unable to see the image or who have images turned off.
If your image does not present any important contextual information, then
the alt attribute should be used, but kept empty.

also the case with "If your image does not present any _additional_
contextual information".

The typical situation in this case is a gallery of images of employees with
a caption containing their name. Now the reasonable alt attribute for a
picture of someone is who they are. Since this is already available in the
form of an accessible caption, alt="" is sufficient.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top