Short URL: http://html5.org/r/6008
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 6008 | 7468 | 2011-04-14 23:46 |
Index: source
===================================================================
--- source (revision 6007)
+++ source (revision 6008)
@@ -41526,6 +41526,7 @@
total).</dd>
<dt>Content attributes:</dt>
<dd><span>Global attributes</span></dd>
+ <dd><code title="attr-table-border">border</code></dd>
<dt>DOM interface:</dt>
<dd>
<pre class="idl">interface <dfn>HTMLTableElement</dfn> : <span>HTMLElement</span> {
@@ -41543,6 +41544,7 @@
readonly attribute <span>HTMLCollection</span> <span title="dom-table-rows">rows</span>;
<span>HTMLElement</span> <span title="dom-table-insertRow">insertRow</span>(in optional long index);
void <span title="dom-table-deleteRow">deleteRow</span>(in long index);
+ attribute DOMString <span title="dom-table-border">border</span>;
};</pre>
</dd>
</dl>
@@ -41552,12 +41554,36 @@
title="concept-table">table</span>.</p>
<div class="impl">
-
<p>The <code>table</code> element takes part in the <span>table
model</span>.</p>
+ </div>
+ <p>Tables have rows, columns, and cells given by their descendants.
+ The rows and columns form a grid; a table's cells must completely
+ cover that grid without overlap.</p>
+
+ <div class="impl">
+ <p class="note">Precise rules for determining whether this
+ conformance requirement is met are described in the description of
+ the <span>table model</span>.</p>
</div>
+ <hr>
+
+ <p>Authors are encouraged to provide information describing how to
+ interpret complex tables. Guidance on how <a
+ href="#table-descriptions-techniques">provide such information</a>
+ is given below.</p>
+
+ <div class="impl">
+ <p>If a <code>table</code> element has a <code
+ title="attr-table-summary">summary</code> attribute, and the user
+ agent has not classified the table as a layout table, the user agent
+ may report the contents of that attribute to the user.</p>
+ </div>
+
+ <hr>
+
<!--END w3c-html--><!--FORK-->
<p>Tables must not be used as layout aids.
@@ -41571,15 +41597,6 @@
likely to find it very difficult to navigate pages with tables used
for layout.</p>
- <div class="impl">
-
- <p>User agents that do table analysis on arbitrary content are
- encouraged to find heuristics to determine which tables actually
- contain data and which are merely being used for layout. This
- specification does not define a precise heuristic.</p>
-
- </div>
-
<!-- The paragraph below replaces the above one in the W3C copy due
to a WG decision. It is not used in the WHATWG copy for the
following reasons:
@@ -41643,29 +41660,76 @@
tables for layout, primarily using CSS positioning and the CSS table
model.</p>
- <p>Tables have rows, columns, and cells given by their descendants.
- The rows and columns form a grid; a table's cells must completely
- cover that grid without overlap.</p>
+ <p>The <dfn title="attr-table-border"><code>border</code></dfn>
+ attribute may be specified on a <code>table</code> element to
+ explicitly indicate that the <code>table</code> element is not being
+ used for layout purposes. If specified, the attribute's value must
+ either be the empty string or the value "<code title="">1</code>".
+ The attribute is used by certain user agents as an indication that
+ borders should be drawn around cells of the table.</p>
<div class="impl">
- <p class="note">Precise rules for determining whether this
- conformance requirement is met are described in the description of
- the <span>table model</span>.</p>
+ <p>Tables can be complicated to understand and navigate. To help
+ users with this, user agents should clearly dilineate cells in a
+ table from each other, unless the user agent has classified the
+ table as a
+<!--END w3c-html--><!--FORK-->
+ (non-conforming)
+<!--START w3c-html--><!--FORK-->
+ layout table.</p>
</div>
- <p>Authors are encouraged to provide information describing how to
- interpret complex tables. Guidance on how <a
- href="#table-descriptions-techniques">provide such information</a>
- is given below.</p>
+ <p class="note">Authors <span class="impl">and implementors</span>
+ are encouraged to consider using some of the <a
+ href="#table-layout-techniques">table layout techniques</a>
+ described below to make tables easier to navigate for users.</p>
<div class="impl">
- <p>If a <code>table</code> element has a <code
- title="attr-table-summary">summary</code> attribute, the user agent
- may report the contents of that attribute to the user.</p>
+ <p>User agents, especially those that do table analysis on arbitrary
+ content, are encouraged to find heuristics to determine which tables
+ actually contain data and which are merely being used for layout.
+ This specification does not define a precise heuristic, but the
+ following are suggested as possible indicators:</p>
+ <table>
+ <thead>
+ <tr>
+ <th>Feature
+ <th>Indication
+ <tbody>
+ <tr>
+ <td>The use of the <code title="attr-aria-role">role</code> attribute with the value <code title="attr-aria-role-presentation">presentation</code>
+ <td>Probably a layout table
+ <tr>
+ <td>The use of the <code title="attr-table-border">border</code> attribute with the non-conforming value 0
+ <td>Probably a layout table
+ <tr>
+ <td>The use of the non-conforming <code title="attr-table-cellspacing">cellspacing</code> and <code title="attr-table-cellpadding">cellpadding</code> attributes with the value 0
+ <td>Probably a layout table
+ <tbody>
+ <tr>
+ <td>The use of <code>caption</code>, <code>thead</code>, or <code>th</code> elements
+ <td>Probably a non-layout table
+ <tr>
+ <td>The use of the <code title="attr-tdth-headers">headers</code> and <code title="attr-th-scope">scope</code> attributes
+ <td>Probably a non-layout table
+ <tr>
+ <td>The use of the <code title="attr-table-border">border</code> attribute with a value other than 0
+ <td>Probably a non-layout table
+ <tr>
+ <td>Explicit visible borders set using CSS
+ <td>Probably a non-layout table
+ <tbody>
+ <tr>
+ <td>The use of the <code title="attr-table-summary">summary</code> attribute
+ <td>Not a good indicator (both layout and non-layout tables have historically been given this attribute)
+ </table>
+
</div>
+ <hr>
+
<dl class="domintro">
<dt><var title="">table</var> . <code title="dom-table-caption">caption</code> [ = <var title="">value</var> ]</dt>
@@ -41941,6 +42005,10 @@
</ol>
+ <p>The <dfn title="dom-table-border"><code>border</code></dfn> IDL
+ attribute must <span>reflect</span> the content attribute of the
+ same name.</p>
+
</div>
<div class="example">
@@ -41978,6 +42046,8 @@
</div>
+
+
<h5 id="table-descriptions-techniques">Techniques for describing tables</h5>
<p id="table-descriptions">For tables that consist of more than just
@@ -42205,7 +42275,36 @@
+ <h5 id="table-layout-techniques">Techniques for table layout</h5>
+ <p>Good table layout is key to making tables more readable and usable.</p>
+
+ <p>In visual media, providing column and row borders and alternating
+ row backgrounds can be very effective to make complicated tables
+ more readable.</p>
+
+ <p>For tables with large volumes of numeric content, using
+ monospaced fonts can help users see patterns, especially in
+ situations where a user agent does not render the borders.
+ (Unfortunately, for historical reasons, not rendering borders on
+ tables is a common default.)</p>
+
+ <p>In speech media, table cells can be distinguished by reporting
+ the corresponding headers before reading the cell's contents, and by
+ allowing users to navigate the table in a grid fashion, rather than
+ serialising the entire contents of the table in source order.</p>
+
+ <p>Authors are encouraged to use CSS to achieve these effects.</p>
+
+ <div class="impl">
+ <p>User agents are encouraged to render tables using these
+ techniques whenever the page does not use CSS and the table is not
+ classified as a layout table.</p>
+ </div>
+
+
+
+
<h4>The <dfn><code>caption</code></dfn> element</h4>
<dl class="element">
@@ -104594,7 +104693,6 @@
<dt><dfn title="attr-pre-width"><code>width</code></dfn> on <code>pre</code> elements</dt>
<dt><dfn title="attr-table-align"><code>align</code></dfn> on <code>table</code> elements</dt>
<dt><dfn title="attr-table-bgcolor"><code>bgcolor</code></dfn> on <code>table</code> elements</dt>
- <dt><dfn title="attr-table-border"><code>border</code></dfn> on <code>table</code> elements</dt>
<dt><dfn title="attr-table-cellpadding"><code>cellpadding</code></dfn> on <code>table</code> elements</dt>
<dt><dfn title="attr-table-cellspacing"><code>cellspacing</code></dfn> on <code>table</code> elements</dt>
<dt><dfn title="attr-table-frame"><code>frame</code></dfn> on <code>table</code> elements</dt>
@@ -104624,7 +104722,20 @@
</dl>
+ <hr>
+ <p>The <code title="attr-table-border">border</code> attribute on
+ the <code>table</code> element can be used to provide basic fallback
+ styling for the purpose of making tables legible in browsing
+ environements where CSS support is limited or absent, such as
+ text-based browsers, WYSIWYG editors, and in situations where CSS
+ support is disabled or the style sheet is lost. Only the empty
+ string and the value "<code title="">1</code>" may be used as <code
+ title="attr-table-border">border</code> values for this purpose.
+ Other values are considered obsolete. To regulate the thickness of
+ such borders, authors should instead use CSS.</p>
+
+
<div class="impl">
<h3>Requirements for implementations</h3>
@@ -105774,7 +105885,6 @@
interface <span>HTMLTableElement</span> {
attribute DOMString <span title="dom-table-align">align</span>;
attribute DOMString <span title="dom-table-bgColor">bgColor</span>;
- attribute DOMString <span title="dom-table-border">border</span>;
attribute DOMString <span title="dom-table-cellPadding">cellPadding</span>;
attribute DOMString <span title="dom-table-cellSpacing">cellSpacing</span>;
attribute DOMString <span title="dom-table-frame">frame</span>;
@@ -105784,7 +105894,6 @@
};</pre>
<p>The <dfn title="dom-table-align"><code>align</code></dfn>, <dfn
- title="dom-table-border"><code>border</code></dfn>, <dfn
title="dom-table-frame"><code>frame</code></dfn>, <dfn
title="dom-table-summary"><code>summary</code></dfn>, <dfn
title="dom-table-rules"><code>rules</code></dfn>, and <dfn
@@ -108082,7 +108191,8 @@
<code>tbody</code>*;
<code>tfoot</code>*;
<code>tr</code>*</td>
- <td><span title="global attributes">globals</span></td>
+ <td><span title="global attributes">globals</span>;
+ <code title="attr-table-border">border</code></td>
<td><code>HTMLTableElement</code></td>
</tr>
@@ -108715,6 +108825,11 @@
<td> Hint that the <span>media resource</span> can be started automatically when the page is loaded
<td> <span>Boolean attribute</span>
<tr>
+ <th> <code title="">border</code>
+ <td> <code title="attr-table-border">border</code>
+ <td> Explicit indication that the <code>table</code> element is not being used for layout purposes
+ <td> The empty string, or "<code title="">1</code>"
+ <tr>
<th> <code title="">challenge</code>
<td> <code title="attr-keygen-challenge">keygen</code>
<td> String to package with the generated and signed public key