Warning:
This wiki has been archived and is now read-only.

ShortFallback

From HTML WG Wiki
Jump to: navigation, search


Summary text equivalent

Use-case

Whenever an element provides a lengthy textual fallback equivalent for non-text media, the same users who can make use of this text equivalent often need an abridged version of the full text. This abridged version an provide a quick read of the full version to let the user decide whether the longer description is required. On the img element, the mechanism for this is provided thorugh a separate alt attribute. ON other embedded content elements, there is no such separate mechanism. In order for UAs to provide this summary, we need an algorithm to summarize the lengthy text or an alt or alt-like attribute on the other embedded content elements or recommend authors provide markup specific to this task.

This table shows a list of the embedded content elements and their associated text-based fallback facilities.

Solutions

Markup in the full text equivalent

We might recommend authors provide specific markup to indicate the summary portion of a lengthier description. For example:

A quick summary

).

Advantages

  • simpler for authors

Disadvantages

  • may be difficult to implement in an interoperable way

Summarization algorithm

Our UA conformance recommendation could include an algorithm to extract a summary from a lengthy textual fallback equivalent. For example, the first 20 words, might be used. Or UAs could extract the contents of the first heading element (e.g.,

A quick summary

). A more complicated algorithm that combines these and other steps could also be used.

Advantages

  • simpler for authors

Disadvantages

  • authors may need to follow careful guidelines to ensure decent summaries
  • may be difficult to implement in an interoperable way

Add the @alt attribute to all embedded content elements

Simply adding the @alt attribute already used on the <img> element would make the other elements consistent with <img>. On the <img> element lengthy fallback content is placed in a separate document fragment targeted an URL value for the the @longdesc attribute. Many other embedded content elements simply use the content of the element since they, unlike <img>, are not defined to be empty elements. However, none of these other elements have an @alt attribute to include an abridged fallback of a lengthy textual fallback equivalent.

Advantages

  • familiar to authors from <img> element

Disadvantages

  • may repeat content already in the lengthy fallback
  • authors may treat @alt as sufficient
  • nesting of embedded content elements may complicate the attribute (e.g., which @alt would be used?)