[html4all] @abbr, short TH fallback for screen readers

Leif Halvard Silli lhs at malform.no
Sat Aug 23 18:05:09 PDT 2008


HTML 4 has the @abbr for table cells, aimed at screen readers, 
primerely. It is sofar not included n HTML 5. Should it be kept?

With a reference to the discussion I, Rob and Jason lead about "short 
@alt" versus "@longdesc" etc,  I would describe @abbr as a "short text 
equivalent of of an table header cell".

Are there User Agents who support this attribute? Do you think it is 
worth keeping? It makes sense to me: For traversal of a table, it should 
be practical to be able to list abbreviated TH content rather than the 
full content.

Here are the HTML 4 code examples with @abbr:

    * <TH id="t3" abbr="Type">Type of Coffee</TH>
    * <TH scope="col" abbr="Name">Course Name</TH>
    * <TH scope="col" abbr="Tutor">Course Tutor</TH>

I was reminded about this issue when I saw Gez's table demonstration 
(for the cause of allowing @headers to point to data cells). [1] There 
Gez has used the ABBR element in 3 of the headings.  But as you can see 
from the code examples above, the @abbr and <ABBR> works differently.

The @abbr reminds me a lot about @label for <OPTION>. (Opera  only added 
support for <option @lable> in Opera 9.5.). Here is what HTML 4 says 
about <option @lable>:

    * label = text [CS]
      This attribute allows authors to specify a shorter label for an
      option than the content of the OPTION element. When specified,
      user agents should use the value of this attribute rather than the
      content of the OPTION element as the option label.


This is what the prose of HTML 4 says about @abbr (note that HTML 4 also 
see a use case for visual agents):

DTD

    * abbr        %Text;         #IMPLIED  -- abbreviation for header
      cell --

Prose:

    * abbr = text [CS]
      This attribute should be used to provide an abbreviated form of
      the cell's content, and may be rendered by user agents when
      appropriate in place of the cell's content. Abbreviated names
      should be short since user agents may render them repeatedly. For
      instance, speech synthesizers may render the abbreviated headers
      relating to a particular cell before rendering that cell's content.
    * The TH element defines a cell that contains header information.
      User agents have two pieces of header information available: the
      contents of the TH element and the value of the abbr attribute.
      User agents must render either the contents of the cell or the
      value of the abbr attribute. For visual media, the latter may be
      appropriate when there is insufficient space to render the full
      contents of the cell. For non-visual media abbr may be used as an
      abbreviation for table headers when these are rendered along with
      the contents of the cells to which they apply.
    * [non-visual UAs:] The abbr attribute specifies an abbreviated
      header for header cells so that user agents may render header
      information more rapidly.


[1] http://juicystudio.com/wcag/tables/complexdatatable.html
-- 
leif halvard silli



More information about the List_HTML4all.org mailing list