WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Language attribute in area element not working in IE


From: Jukka K. Korpela
Date: Oct 6, 2009 2:05PM

Varela, Marilyn wrote:

> We have an image map of 14 flags in the footer of our website that
> depict the alternate languages we offer information in.

To be accessible, replace it by a list of links, using language names.

> Please don't
> respond to the issue of using flags for languages; I already lost that
> debate.

There's no need for a debate on that. If your boss or customer does not
listen to rational arguments or even authoritative recommendations on this,
then you have to do what you have to do.

If you think you can still work with accessibility in mind under such
circumstances, replace the image map by a set of 14 images that are links.
Then use normal alt attribute techniques. Using an image map offers no
benefits beyond marginal (and possibly quite imaginary) difference in load
time, as a single image loads marginally faster than 14 smaller images.

> In order to display the native language instead of the
> English name in the alt text and title attribute I am using the lang
> attribute in the area element. All the languages show correctly in
> Firefox but some of them do not display in IE. I get a row of boxes
> instead of charcters.

I'm not sure what you have done (and why). A URL would be most helpful, as

I'm about 100.1% sure that the issue is with characters and glyphs, not
language markup. Generally IE has character problems far more often than
other browsers. They manifest themselves even in normal text, though in the
rendering of alt and title attributes, the problems could conceivably be
bigger, since their renderings takes place in a special environment in a
browser-depedendent way.

Theoretically, a lang="..." attribute specifies the language used in the
element's content _and_ attribute values, so it would be quite appropriate
to use in in principle. In practice, browsers just ignore it, except in the
special cases when they use the language information to make odd choices of
fonts (in the relatively rare cases where authors don't specify fonts). Some
speech-based browsers use the language information to select speech
synthesis methods, but this is much more rare than many people say when they
babble about accessibility.

Yucca, http://www.cs.tut.fi/~jkorpela/