Abbr attribute in tables

Ah, question:
I’m reading http://www.w3.org/TR/html401/struct/tables.html#adef-abbr and http://www.w3.org/TR/2005/WD-WCAG20-HTML-TECHS-20050630/#datatables_abbr and wonder about going the other way around.

In small tables like Calendars, you use abbreviations in the first place, because there simply isn’t room to use the full words. I thought abbr could be used to make the full word be spoken for AT instead of sounding weird.

Example:


<table>
  <thead>
    <tr>
      <th colspan="7" scope="colgroup">november 2010</th>
    </tr>
    <tr>
      <th abbr="zondag" scope="col">zo</th>
      <th abbr="mandag" scope="col">ma</th>
      <th abbr="dinsdag" scope="col">di</th>
      <th abbr="woensdag" scope="col">wo</th>
      <th abbr="donderdag" scope="col">do</th>
      <th abbr="vrijdag" scope="col">vr</th>
      <th abbr="zaterdag" scope="col">za</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td></td>
      <td>1</td>
      <td>2</td>
      <td>3</td>
      <td>4</td>
      <td>5</td>
      <td>6</td>
    </tr>
...etc
  </tbody>
</table>

So in order to get “Monday 1” instead of “ma 1” I’ve got abbr. What comes to mind:
The first time through, the actual th is (may be, depends on reader/settings) read out, and then the abbr versions. Defeats the purpose.
Second, I’m assuming there’s a visual precedent (there is) but not an audio precedent (I don’t know if people are used to “wo” as meaning “woensdag” (wednesday)).

I’m wondering if there’s any discussion or precedent of using abbr (or something else) for tables who have the opposite-from-usual problem: the headers are already shortened, and the full meaning should be spoken at least the first time.

There is mention of other-way-around in the W3C specs:

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.

On WCAG, the assumption is the header may be too long, and repeated listening of a long header is not desirable, so the abbr text can be read out instead (after at least one instance of the full header being read out).

Why not use the <abbr> element?


<th><abbr title="Monday">Mo</abbr></th>

cheers,

gary

Because those are not guaranteed to read anything out in AT… so far as I know, abbr attribute in tables have a higher read rate since they were created most specifically for screen readers.

Definitely a title attribute isn’t going to read out when you’re at the bottom of the table (if you’re going for column-header read out right before data-cell info).

OK, I seriously misunderstood your problem.

I suppose

<th>Mo<span>nday</span></th>

would cause an ugly butchering of the word? Where th span {display: none;}.

cheers,

gary

Hm.

No, that’s a convoluted but interesting idea. Not display: none there of course (otherwise you’re still getting “mo” read out) but off screen could work. It does assume your abbreviation is the first part of the word though.

Could also work for when you have “price” as the shortened header and visually it’s obvious that it’s “price per widget” or something, so visually you only need “price” but you want “price per widget” read out at least once. Abbr does this the other way:
If you have
<th scope=“col” abbr=“price”>Price per widget</th>
Here first time around you get “price per widget” but repeated readings give you the more desirable “price”. See example with “Type” on W3C page.

I’m just wondering if it’s also meant for the other way around… something beyond the single cryptic sentence on the W3C page.