Summary

Providing a text alternative for embedded objects ensure the content is accessible regardless of support for the format.

Techniques

Examples

Example 1 — Fallback for an embedded spreadsheet

A table is include inside the object tag with comparable data.

<object data="data/timesheet.xls">
   <table>
     <thead>
       <tr>
         <th>Employee</th>
         <th>ID</th>
         <th>Activity</th>
         <th>Station</th>
         <th>Completed</th>
         <th>Start</th>
         <th>End</th>
         <th>Total Hours</th>
       </tr>
     </thead>
     …
   </table>
</object>

Explanation

The object element allows the embedding of multimedia content in HTML documents. Its use for audio and video content is generally discouraged, however, as it lacks the accessible playback controls provided by the audio and video elements.

Do not include media alternatives, like transcripts, in the body of an object. If the audio or video format can be played, users who need access to the transcript will not have access to it.

As the object element is most often used to embed non-HTML content, a fallback needs to be provided for users who cannot access the content in its native form. The common way to achieve this is to provide an HTML equivalent within the body of the object element. This content is presented to the user if the specified format is not supported.

References