- From: Ben 'Cerbera' Millard <cerbera@projectcerbera.com>
- Date: Sun, 27 Jan 2008 13:18:43 -0000
- To: "James Graham" <jg307@cam.ac.uk>, "Ben Boyle" <benjamins.boyle@gmail.com>
- Cc: "HTMLWG" <public-html@w3.org>
Ben Boyle wrote:
> This table has both row and column headings [...] It's the top left cell
> that bugs me.
>
> If it contains "Time" then it should be a <th scope="row">
> If it contains "Channel" then it should be a <th scope="col">
>
> How can this be unambiguous (to a UA) without @scope?
>
James Graham wrote:
> AFICT it can't.
Without scope, I think it should apply downwards. From the tables I've seen,
a header in that position is always labelling the row headers below it. But
I haven't seen every table which exists. :-)
If an author wants to apply it across that row, I think scope="row" is a
sensible way to make that happen. The algorithm could prevent this type of
header being applied downwards if we add a "smart headers" stage in or
around the "HTML5 scope" stage:
1. In tables with a header in the top-left corner, apply these steps to that
header:
a. If it uses scope=row:
i. Apply it across that row, respecting "smart rowspan".
b. If it has no scope value:
i. If all cells on that row are header cells, apply it down that
column.
c. Otherwise, do nothing for this stage.
Step 1c means a top-left cell with scope set to "col", "colgroup" or
"rowgroup" would still work. If we go cell-by-cell and make the headers+id
stage block the subsequent stages, as James proposed last year, irregular
cases remain intact.
Doing more analysis of real tables might identify a higher level of patterns
which are shared by header cell arrangements. Fewer, more abstract steps in
the "smart colspan" stage could then accomodate all the regular cases.
Including top-left header cells. For any depth of column headers and row
headers. headers+id would remain for irregular cases.
I've not yet found a way to make ends meet whilst doing a new round of
analysis. It's a pipedream for now. :-(
Ben Boyle wrote:
> Often this cell is blank in tables (which is easy, I just use <td></td>
> ... even within <thead>) [...]
That's what I do, too. An empty <th> would also work there. Real tables use
either, IIRC.
Sometimes a cell contains insignificant content, such as or <br>.
These should be [ignored]. Among other things, this would avoid functionally
empty top-left header cells being associated with data cells. Thus
supporting real tables accessibly.
[Inspector] <http://james.html5.org/tables/table_inspector.html>
[ignored] Search for "significant content":
<http://lists.w3.org/Archives/Public/public-html/2007Sep/0194.html>
--
Ben 'Cerbera' Millard
Collections of Interesting Data Tables
<http://sitesurgeon.co.uk/tables/>
Received on Sunday, 27 January 2008 13:19:22 UTC