Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

25 Generating WAI markup for HTML > 25.2 Applying WAI markup to images > 25.2.2 Assigning WAI image attributes with dedicated formats


25.2.2 Assigning WAI image attributes with dedicated formats

You can designate a paragraph format whose content will be the text alternative for the next anchored frame in a flow. For example, suppose you use paragraph format Figname for this purpose:

[HTMLParaStyles]

; Alt makes current para content into alt attribute for next img

Figname=Alt Delete

Somewhere just before the image you would insert a Figname paragraph containing the name you want displayed as an alternate for the graphic image. Probably you would make the Figname paragraph conditional so it would not appear in print. The Delete property would exclude the paragraph (as such) from HTML output; HTML source would show the text of the Figname paragraph as the value for the alt attribute of the <img> element.

For example, if you were to place a Figname paragraph with the content “Cat in basket” just before the image, in some browsers moving the pointer over the image would display this content in a tooltip. However, in most current browsers, the tooltip shows the content of the title attribute rather than the alt attribute; and the alt text is displayed only when the image is not displayed or is missing.

You can use a similar strategy to provide content for the longdesc attribute of the <img> element; for example, using paragraph format Figdesc for this purpose:.

[HTMLParaStyles]

; Longdesc makes current para content into longdesc attribute

Figdesc = Longdesc Delete

The Delete property would exclude the paragraph from normal HTML text output.



25 Generating WAI markup for HTML > 25.2 Applying WAI markup to images > 25.2.2 Assigning WAI image attributes with dedicated formats