Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

23 Including graphics in HTML > 23.8 Providing (or omitting) alternate text for images


23.8 Providing (or omitting) alternate text for images

Most current browsers display the content of the alt attribute of an <img> tag only when the image itself is not displayed.

Note:  To show a text value in a tooltip when you move the pointer over an image, use the title attribute instead.

By default, if you do not provide alt text for an image, Mif2Go includes an empty alt value, to satisfy validators. To omit empty alt attribute values:

[Graphics]

; AllowEmptyAlt = Yes (default) or No, omit empty alt attributes.

AllowEmptyAlt = No

You can specify a value for the <img> tag alt attribute in any of the following ways:

Include the text in a paragraph

Insert the text with a marker

Add the text via Object Attributes

Assign the text to the graphic file.

Include the text in a paragraph

To use a dedicated paragraph format for alternate text, place a paragraph containing the text in your FrameMaker document, just before the image, and assign the following properties to the paragraph format:

[HTMLParaStyles]

AltParaFmt = Alt Delete

The Delete property prevents the alternate text from appearing as part of the HTML output. See §25.2.2 Assigning WAI image attributes with dedicated formats.

To use a character format instead of a paragraph format to provide a value for the alt attribute, assign it in [HTMLCharStyles] instead of in [HTMLParaStyles].

Insert the text with a marker

To provide alternate text with a marker, insert a marker of type GraphAlt in your FrameMaker document, just before the image. The content of the GraphAlt marker becomes the value of the alt attribute for the next image. See §25.2.3 Assigning WAI image attributes with custom markers and §29.2.4 Using attribute markers for HTML or XML.

Add the text via Object Attributes

For images in anchored frames, in FrameMaker 7.0 and later versions you can provide a value for the alt attribute via the Object Attributes dialog. See §23.7 Specifying HTML image attributes and §31.4.2 Overriding graphics settings with FrameMaker object attributes.

Assign the text to the graphic file

To assign alternate text to the graphic file (for example):

[GraphALT]

; Graphic file name (with or without extension) = desired alt text

ch01f853.gif = Schematic of tuner

This method is not recommended if your document includes image maps, and you also use the [GraphALT] section to assign alternate text to hotspot <area> tags. You could lose the alt content you assign to the <img> tags. See §23.10.2 Providing alternate text for a hotspot in an image map.



23 Including graphics in HTML > 23.8 Providing (or omitting) alternate text for images