Some better evaluation of image markup

Thursday’s nightly build of Firefox 3 contained a change that will give more useful information on certain pages where attributes for image tags have been used in some funny way. There are sometimes sites where the web author supplies an alt attribute with an empty string "", and in addition supplies a title with useful data.

As per agreement among ATs and browser vendors, images that have an alt attribute with an empty string should be considered decorative images. However, if a title attribute is specified as well, we now assume that the author means to supply some useful information, and will expose the title as the accessible name for such images.

JAWS and Window-Eyes have applied such magic for quite some time already, and now Firefox supports this method for all who care to use it.

Also, this change restores the fact that, if no alt attribute is specified at all, and no title is present, either, we return a NULL pointer instead of an empty string. This will allow ATs to differenciate between “no alt” and “alt is empty”.

4 comments:

  1. Does it means that Fx3 will put an imagfe popup with the content of the title attribute, as it was in alt …. and in the stupi way that does IE ?

  2. No, the way the title is displayed is not affected. It just means that for assistive technologies, the title is being used if available and if the alt is “”. Visually there won’t be any change.

  3. I’m not sure what the advantage of this is. Surely if there is information in the title attribute then there ought to be in the alt attribute as well. Could you give me an example of where it could be useful to have a title but and empty alt attribute?

What are your thoughts?