HTML and CSS Reference
In-Depth Information
-html40/struct/objects.html#adef-longdesc-IMG
) will likely be cut from
HTML5. In its place, either link to a page with a longer text alternative
or provide that content adjacent to the image, as described earlier in this
recipe.
Using figcaption
In HTML5, an image may be enclosed in a
figure
element and the
figcaption
element
may either provide the entire text alternative or supplement the text alternative provi-
ded in the image's
alt
attribute.
In practice, the
alt
attribute has and will continue to provide a more
generic method for providing information about an image until such
time that the
figcaption
element is well supported in browsers and
assistive technologies.
As mentioned previously, some assistive technologies completely ignore images with
an empty
alt
attribute. To make an image discoverable, omit the
alt
attribute if you
do not plan to include a value for it:
<figure>
<img src="ceremony_photo.jpg">
<figcaption>
Opening ceremony for the new library building at the state university.
</figcaption>
</figure>
See Also
“HTML5: Techniques for providing useful text alternatives” at
http://dev.w3.org/html5/
7.2 Identifying Abbreviations and Acronyms
Problem
You want to identify to users what an abbreviation or an acronym represents.
Solution
Include the
full
expansion of the abbreviation in the page content.
Usually, one encloses the abbreviation in parentheses after the full expansion. Include
this at least the first time that the abbreviation appears on the page: