3 ms·
> The <table> tag is for tabular data, it implies relationships between it's elements that are of utter importance for screen readers and machines. Nope. The <
by Daniel_Newby 15y ago
> The <table> tag is for tabular data, it implies relationships between it's elements that are of utter importance for screen readers and machines.
Nope. The <table> element was originally defined as an all-purpose chainsaw for two-dimensional relationships. The browser crackmonkeys locked us into that in the late '90s, and we have to deal with it forever. We are stuck with the legacy of billions of old documents, and thousands of old HTML parsers.
The W3C is pissing into the wind by trying to rewrite history. They cannot simply wish away technical lock-in by putting a "TABLE elements are semantic" clause in a standard. That needs to be repealed, and the we-must-ignore-history children must be given a spanking and sent to their rooms.
What the W3C should do is define a "tabulartext" attribute:
<!-- A table of data to read -->
<table tabulartext>
<tr><th>Title</th> <th>Title</th></tr>
<tr><td>Data</td> <td>Data</td></tr>
</table>
<!-- Structural markup -->
<table>
<tr>
<td>{{left_sidebar}}</td>
<td>{{content}}</td>
<td>{{right_sidebar}}</td>
</tr>
</table>
If they did this, the screen readers and Alexa top 500 sites would STAMPEDE towards a bright new future of accessibility, machine readability, and backwards compatibility.
- ricardobeat 15y agoYou're joking right? The HTML table model allows authors to arrange data -- text, preformatted text, images, links, forms, form fields, other tables, etc. -- into rows and columns of cells. - HTML 4.01 specification, 1999 Tables were added in the HTML3 spec: HTML 3.2 includes a widely deployed subset of the specification given in RFC 1942 and can be used to markup tabular material or for layout purposes. Note that the latter role typically causes problems when rending to speech or to text only user agents. - HTML3.2, 1997 The "for layout purposes" was a big mistake, they even acknowledged that it wasn't adequate. Fixed 2 years later, or 10 years ago. There is no reason to markup things as tables when you can have a much clearer document outline using the proper header and grouping elements. HTML5 parsers have no problem keeping up with old tag soup, but that doesn't mean we should keep writing crap. Implying that sites built using only tables are accessible and machine readable is just.. asinine.