example of TABLE using scope, axis, and 'speak-header' (adapted from CSS2, Section 17.7)

the attached is an attempt to both provide the HTML working group 
with an example of a table using the scope and axis attributes 
defined for TD and TH, as well as an illustration of the 
following:

<q 
cite="http://www.w3.org/TR/CSS2/tables.html#q21">

17.7 Audio rendering of tables

When a table is spoken by a speech generator, the relation between 
the data cells and the header cells must be expressed in a different 
way than by horizontal and vertical alignment. Some speech browsers 
may allow a user to move around in the 2-dimensional space, thus 
giving them the opportunity to map out the spatially represented 
relations. When that is not possible, the style sheet must specify 
at which points the headers are spoken.

17.7.1 Speaking headers: the 'speak-header' property

'speak-header' 
      Value:  once | always | inherit   
    Initial:  once   
 Applies to:  elements that have table header information   
  Inherited:  yes   
Percentages:  N/A   
      Media:  aural  


This property specifies whether table headers are spoken before 
every cell, or only before a cell when that cell is associated with 
a different header than the previous cell. Values have the following 
meanings:

once 
    The header is spoken one time, before a series of cells. 
always 
    The header is spoken before every pertinent cell. 

Each document language may have different mechanisms that allow authors 
to specify headers. For example, in HTML 4.0 ([HTML40]), it is possible 
to specify header information with three different attributes ("headers", 
"scope", and "axis"), and the specification gives an algorithm for 
determining header information when these attributes have not been 
specified.

Image of a table created in MS Word
[SRC = http://www.w3.org/data/html/reference/CSS2/images/table1.gif]
[D link = http://www.w3.org/TR/CSS2/IMAGES/LONGDESC/table1-desc.html]

Image of a table with header cells ("San Jose" and "Seattle") that are 
not in the same column or row as the data they apply to. 

This HTML example presents the money spent on meals, hotels and 
transport in two locations (San Jose and Seattle) for successive days. 
Conceptually, you can think of the table in terms of a n-dimensional 
space. The headers of this space are: location, day, category and 
subtotal. Some cells define marks along an axis while others give 
money spent at points within this space. The markup for this table is:

<TABLE>
<CAPTION>Travel Expense Report</CAPTION>
<TR>
  <TH></TH>
  <TH>Meals</TH>
  <TH>Hotels</TH>
  <TH>Transport</TH>
  <TH>subtotal</TH>
</TR>
<TR>
  <TH id="san-jose" axis="san-jose">San Jose</TH>
</TR>
<TR>
  <TH headers="san-jose">25-Aug-97</TH>
  <TD>37.74</TD>
  <TD>112.00</TD>
  <TD>45.00</TD>
  <TD></TD>
</TR>
<TR>
  <TH headers="san-jose">26-Aug-97</TH>
  <TD>27.28</TD>
  <TD>112.00</TD>
  <TD>45.00</TD>
  <TD></TD>
</TR>
<TR>
  <TH headers="san-jose">subtotal</TH>
  <TD>65.02</TD>
  <TD>224.00</TD>
  <TD>90.00</TD>
  <TD>379.02</TD>
</TR>
<TR>
  <TH id="seattle" axis="seattle">Seattle</TH>
</TR>
<TR>
  <TH headers="seattle">27-Aug-97</TH>
  <TD>96.25</TD>
  <TD>109.00</TD>
  <TD>36.00</TD>
  <TD></TD>
</TR>
<TR>
  <TH headers="seattle">28-Aug-97</TH>
  <TD>35.00</TD>
  <TD>109.00</TD>
  <TD>36.00</TD>
  <TD></TD>
</TR>
<TR>
  <TH headers="seattle">subtotal</TH>
  <TD>131.25</TD>
  <TD>218.00</TD>
  <TD>72.00</TD>
  <TD>421.25</TD>
</TR>
<TR>
  <TH>Totals</TH>
  <TD>196.27</TD>
  <TD>442.00</TD>
  <TD>162.00</TD>
  <TD>800.27</TD>
</TR>
</TABLE>

By providing the data model in this way, authors make it possible for 
speech enabled-browsers to explore the table in rich ways, e.g., each 
cell could be spoken as a list, repeating the applicable headers before 
each data cell:

  San Jose, 25-Aug-97, Meals:  37.74
  San Jose, 25-Aug-97, Hotels:  112.00
  San Jose, 25-Aug-97, Transport:  45.00
 ...

The browser could also speak the headers only when they change:

San Jose, 25-Aug-97, Meals: 37.74
    Hotels: 112.00
    Transport: 45.00
  26-Aug-97, Meals: 27.28
    Hotels: 112.00

</q>

------------------------------------------------------------------
I must think myself independent, as long as I live; the feeling is 
essential to my existence.                           -- John Adams
------------------------------------------------------------------
    Gregory J. Rosmaita: oedipus@hicom.net or gregory@ubats.org
         Camera Obscura: http://www.hicom.net/~oedipus/
Oedipus' Online Complex: http://my.opera.com/oedipus/
UBATS - United Blind Advocates for Talking Signs: http://ubats.org
------------------------------------------------------------------

Received on Thursday, 26 July 2007 16:11:21 UTC