<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pierre Dubois</title>
	<atom:link href="http://www.pdprogrammeur.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.pdprogrammeur.com</link>
	<description>Programmeur</description>
	<lastBuildDate>Sat, 19 May 2012 14:44:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>What&#8217;s an usable table ?</title>
		<link>http://www.pdprogrammeur.com/?p=84</link>
		<comments>http://www.pdprogrammeur.com/?p=84#comments</comments>
		<pubDate>Sat, 19 May 2012 14:44:35 +0000</pubDate>
		<dc:creator>Pierre Dubois</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.pdprogrammeur.com/?p=84</guid>
		<description><![CDATA[Developing an usability guideline for table are not easy. Whatever that is what about I am working on. I have nothing ready to be released to the public yet. But I will share it on my blog once the document will be ready. The guideline is about how an web … <a href="http://www.pdprogrammeur.com/?p=84"> Continue reading <span class="meta-nav">&#8594; </span></a>]]></description>
			<content:encoded><![CDATA[<p>Developing an usability guideline for table are not easy. Whatever that is what about I am working on. I have nothing ready to be released to the public yet. But I will share it on my blog once the document will be ready.</p>
<p>The guideline is about how an web editor should design complex and simple table. </p>
<ul>
<li>How to add a data group summary</li>
<li>How to organize the group header (eg. thead for the row group)</li>
<li>How to desing your data group (eg. tbody for the row group)</li>
<li>How to have multi information level in your complex table</li>
<li>How to name your data group</li>
<li>How to use the colgroup and col tag</li>
<li>How you can have nested data table</li>
</ul>
<p>That is and more about what the guideline will cover. Also I will develop a javascript table parser with the capability to understand those table and query them. The table query will be integrated with the jquery selector and also behalf a function with the ability to retrieve the virtual structural information.</p>
<p>Keep posted !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pdprogrammeur.com/?feed=rss2&#038;p=84</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create an Accessible HTML Graphic</title>
		<link>http://www.pdprogrammeur.com/?p=74</link>
		<comments>http://www.pdprogrammeur.com/?p=74#comments</comments>
		<pubDate>Wed, 07 Mar 2012 20:08:33 +0000</pubDate>
		<dc:creator>Pierre Dubois</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.pdprogrammeur.com/?p=74</guid>
		<description><![CDATA[This article describe how you can easily create an accessible HTML graphic from a simple or complex data table. You may want to read first the article about How to create a HTML5 table. What is the result ? What you need &#8230; First you need to create an well … <a href="http://www.pdprogrammeur.com/?p=74"> Continue reading <span class="meta-nav">&#8594; </span></a>]]></description>
			<content:encoded><![CDATA[<p>This article describe how you can easily create an accessible HTML graphic from a simple or complex data table. You may want to read first the article about <a title="Tables and HTML5 Tables" href="http://www.pdprogrammeur.com/?p=1">How to create a HTML5 table</a>.</p>
<h2>What is the result ?</h2>
<p><a href="http://www.pdprogrammeur.com/wp-content/uploads/2012/03/resultSimpleExample.jpg"><img class="alignnone size-full wp-image-76" title="Visual preview of the table and the generated graphic" src="http://www.pdprogrammeur.com/wp-content/uploads/2012/03/resultSimpleExample.jpg" alt="Visual preview of the table and the generated graphic" width="463" height="315" /></a></p>
<h2>What you need &#8230;</h2>
<p>First you need to create an well formatted HTML table by using the table row grouping. Check the article about <a title="Tables and HTML5 Tables" href="http://www.pdprogrammeur.com/?p=1">How to create a HTML5 table</a>.</p>
<p>After you have coded your data table, you will need to include 3 files to the head section of your web page and the <a title="JQuery Official website" href="http://jquery.com/">jQuery library</a> (v1.4.4 or higher) and <a href="http://raphaeljs.com/">Raphaël JavaScript Library</a> (v2.0 or higher).</p>
<pre>&lt;link href="css/graph2-0style.css" rel="stylesheet" type="text/css" /&gt;
&lt;script src="js/jquery-1.7.1.min.js"&gt;&lt;/script&gt;
&lt;script src="js/raphael-min.js"&gt;&lt;/script&gt;
&lt;script src="js/charts.jQuery.js"&gt;&lt;/script&gt;</pre>
<p><a href="http://www.pdprogrammeur.com/wp-content/uploads/2012/03/wet-boew-graph-v2.0.zip">Download the zip file</a> (90 Kb)</p>
<h2>How to use it ?</h2>
<p>The same way as the majority of existing JQuery plugin by using the progressive enhancement approach.  See here a sample you can include in your head of your web page</p>
<pre>&lt;script type="text/javascript"&gt;
//&lt;![CDATA[
   $(document).ready(function(){
      $('.wet-boew-graph').charts();
   });
//]]&gt;
&lt;/script&gt;</pre>
<p>After you only need to add the CSS class &#8220;wet-boew-graph&#8221; to your table used as source for generating the graphic. By default, the type of graphic generated are line graph, but that can be fully customized by using CSS Option Class.</p>
<p>Here an example of a simple table.</p>
<pre> &lt;table class="wet-boew-graph"&gt;
    &lt;caption&gt;2009 Individual Sales by Category&lt;/caption&gt;
    &lt;thead&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;/td&gt;
            &lt;th&gt;food&lt;/th&gt;
            &lt;th&gt;auto&lt;/th&gt;
            &lt;th&gt;household&lt;/th&gt;
            &lt;th&gt;furniture&lt;/th&gt;
            &lt;th&gt;kitchen&lt;/th&gt;
            &lt;th&gt;bath&lt;/th&gt;
        &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;th&gt;Peter&lt;/th&gt;
            &lt;td&gt;350&lt;/td&gt;
            &lt;td&gt;100&lt;/td&gt;
            &lt;td&gt;-50&lt;/td&gt;
            &lt;td&gt;400&lt;/td&gt;
            &lt;td&gt;100&lt;/td&gt;
            &lt;td&gt;70&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;</pre>
<p>Now you can enjoy you accessible graphic.</p>
<h3>Please note</h3>
<p>The graphic widget are not affected by ids/headers attribute and currently any scope value because the table are parsed by is markup structure. The graphic widget will generate unique ids, if they don&#8217;t exist, for each heading cell and for the table itself. Also if present or not, the headers attribute will be set or reset accordingly the way the table are parsed and understood by the graph widget.</p>
<p>Quick tips:<em> If you want to set ids/headers attributes to your table markup, you can run the widget first, extract the live table source code with an utility, like firebug, and paste directly in your HTML markup. That is a safe way and easiest way to assign ids/headers to your data table.</em></p>
<h2>How to customize your graphic ?</h2>
<h3>Change the graph type</h3>
<p>The graph type are defined with CSS class added to the table, tbody or tr element. It&#8217;s possible to combine multiple graph type together and generate an awesome graphic. The exception are the pie chart, this one can not be combined yet.</p>
<h4>Line graph</h4>
<p>css class: wb-graph-line</p>
<pre>&lt;table class="wet-boew-graph wb-graph-line"&gt;</pre>
<p>or</p>
<pre>&lt;tbody class="wb-graph-line"&gt;</pre>
<p>or</p>
<pre>&lt;tr&gt;
   &lt;th class="wb-graph-line"&gt;Peter&lt;/th&gt;
   &lt;td&gt;350&lt;/td&gt;
   &lt;td&gt;100&lt;/td&gt;
   &lt;td&gt;-50&lt;/td&gt;
   &lt;td&gt;400&lt;/td&gt;
   &lt;td&gt;100&lt;/td&gt;
   &lt;td&gt;70&lt;/td&gt;
&lt;/tr&gt;</pre>
<h4>Area graph</h4>
<p>css class: wb-graph-area</p>
<pre>&lt;table class="wet-boew-graph wb-graph-area"&gt;</pre>
<p>or</p>
<pre>&lt;tbody class="wb-graph-area"&gt;</pre>
<p>or</p>
<pre>&lt;tr&gt;
   &lt;th class="wb-graph-area"&gt;Peter&lt;/th&gt;
   &lt;td&gt;350&lt;/td&gt;
   &lt;td&gt;100&lt;/td&gt;
   &lt;td&gt;-50&lt;/td&gt;
   &lt;td&gt;400&lt;/td&gt;
   &lt;td&gt;100&lt;/td&gt;
   &lt;td&gt;70&lt;/td&gt;
&lt;/tr&gt;</pre>
<h4>Bar graph</h4>
<p>css class: wb-graph-line</p>
<pre>&lt;table class="wet-boew-graph wb-graph-bar"&gt;</pre>
<p>or</p>
<pre>&lt;tbody class="wb-graph-bar"&gt;</pre>
<p>or</p>
<pre>&lt;tr&gt;
   &lt;th class="wb-graph-bar"&gt;Peter&lt;/th&gt;
   &lt;td&gt;350&lt;/td&gt;
   &lt;td&gt;100&lt;/td&gt;
   &lt;td&gt;-50&lt;/td&gt;
   &lt;td&gt;400&lt;/td&gt;
   &lt;td&gt;100&lt;/td&gt;
   &lt;td&gt;70&lt;/td&gt;
&lt;/tr&gt;</pre>
<h4>Stacked graph</h4>
<p>css class: wb-graph-stacked</p>
<pre>&lt;table class="wet-boew-graph wb-graph-stacked"&gt;</pre>
<p>or</p>
<pre>&lt;tbody class="wb-graph-stacked"&gt;</pre>
<p>or</p>
<pre>&lt;tr&gt;
   &lt;th class="wb-graph-stacked"&gt;Peter&lt;/th&gt;
   &lt;td&gt;350&lt;/td&gt;
   &lt;td&gt;100&lt;/td&gt;
   &lt;td&gt;-50&lt;/td&gt;
   &lt;td&gt;400&lt;/td&gt;
   &lt;td&gt;100&lt;/td&gt;
   &lt;td&gt;70&lt;/td&gt;
&lt;/tr&gt;</pre>
<h4>Pie graph</h4>
<p>css class: wb-graph-line</p>
<pre>&lt;table class="wet-boew-graph wb-graph-pie"&gt;</pre>
<p>or</p>
<pre>&lt;tbody class="wb-graph-pie"&gt;</pre>
<h3>More customization ?</h3>
<p>They exist more customization like changing the colour, &#8230; That will be discussed in a further article about how to create a complex accessible graphic.</p>
<h2>What is &#8220;wet-boew&#8221; prefix ?</h2>
<p>The &#8220;wet-boew&#8221; prefix stand for in English &#8220;Web Experience Toolkit&#8221; and in French for &#8220;Boîte à Outils de l&#8217;Expérience Web&#8221;.</p>
<p>The <a href="https://ircan-rican.gc.ca/projects/gcwwwtemplates">WET toolbox</a> are an integration of several open source javascript projects, modified some time to be accessible (WCAG 2.0 Level AA compliant). This plugin was developed from scratch and managed by me under the WET toolbox. If you found bugs or if you want to make any improvement suggestion, you can do it behalf the <a href="https://ircan-rican.gc.ca/projects/gcwwwgraph">chart and graph project</a> web page.</p>
<h2>License, Terms and Conditions of Use</h2>
<h3>Web Experience Toolkit (WET) &#8211; Terms and Conditions of Use</h3>
<p>Unless otherwise noted, computer program source code of the Web Experience Toolkit (WET) is covered under Crown Copyright, Government of Canada, and is distributed under the MIT License.</p>
<p>The Canada wordmark and related graphics associated with this distribution are protected under trademark law and copyright law. No permission is granted to use them outside the parameters of the Government of Canada&#8217;s corporate identity program. For more information, see http://www.tbs-sct.gc.ca/fip-pcim/index-eng.asp</p>
<p>Copyright title to all 3rd party software distributed with the Web Experience Toolkit (WET) is held by the respective copyright holders as noted in those files. Users are asked to read the 3rd Party Licenses referenced with those assets.</p>
<h3>MIT License</h3>
<p>Copyright (c) 2012 Government of Canada</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &#8220;Software&#8221;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED &#8220;AS IS&#8221;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
<h3>3rd party software distributed</h3>
<ul>
<li><a href="http://jquery.com/">jQuery</a> &#8211; <a href="http://jquery.org/license">jQuery license (MIT/GPL v2.0)</a></li>
<li><a href="http://raphaeljs.com/">Raphaël—JavaScript Library</a> &#8211; <a href="http://raphaeljs.com/license.html">MIT license</a></li>
</ul>
<h2>What is the purpose of each file in the attached zip ?</h2>
<p><em>raphael-min.js :</em> That is the library used to draw inside the web page. It&#8217;s use SVG and VML for IE. That library is similar to the canvas element in HTML5.</p>
<p><em>jquery-1.7.1.min.js :</em> This is the main library used by the chart widget to analyze the table, calculate and design the graphic.</p>
<p><em>charts.jQuery.js :</em> This is the graph widget.</p>
<p><em>graph2-0style.css :</em> This is simple CSS code regarding how to style the HTML5 figure and figcaption element.</p>
<h2>What&#8217;s next ?</h2>
<p>In a future blog post, I will explain how to generate a complex graphic and also how to do more customization like changing the color of the line, bar, stacked bar, area or pie quarter in your graphic.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pdprogrammeur.com/?feed=rss2&#038;p=74</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Tables and HTML5 Tables</title>
		<link>http://www.pdprogrammeur.com/?p=1</link>
		<comments>http://www.pdprogrammeur.com/?p=1#comments</comments>
		<pubDate>Thu, 09 Feb 2012 12:05:04 +0000</pubDate>
		<dc:creator>Pierre Dubois</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://pdprogrammeur.com//?p=1</guid>
		<description><![CDATA[This documentation is an interpretation of the author from his research and experience concerning the use and creation of a table. This documentation includes guidelines on how to create your table and make it work with the chart and graph javascript plug-in. The following information is for Web publishers and … <a href="http://www.pdprogrammeur.com/?p=1"> Continue reading <span class="meta-nav">&#8594; </span></a>]]></description>
			<content:encoded><![CDATA[<p><em>This documentation is an interpretation of the author from his research and experience concerning the use and creation of a table. This documentation includes guidelines on how to create your table and make it work with the <a href="#">chart and graph javascript plug-in</a>.</em></p>
<p>The following information is for Web publishers and can be useful for Web content providers.</p>
<h2>Layout table vs. data table</h2>
<h3>Layout table</h3>
<p>A layout table must be <strong>invisible</strong> to the end-user. It uses only the basic table markups like <em>&lt;table&gt;</em>, <em>&lt;tr&gt;</em> and <em>&lt;td&gt;</em>. Any other markup will create a data table. See <a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/F46">F46: Failure of Success Criterion 1.3.1 due to using th elements, caption elements, or non-empty summary attributes in layout tables</a></p>
<p>The content of the table also needs to make sense when linearized. To see your linearized table, take the HTML code and remove any <em>&lt;tr&gt;</em>, <em>&lt;td&gt;</em> and try to read and understand the content. If you are able to, the layout table is good. see <a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/F49">F49: Failure of Success Criterion 1.3.2 due to using an HTML layout table that does not make sense when linearized</a></p>
<h3>Data table</h3>
<p>A data table is used to <strong>show two or more dimensional content</strong> to the end-user. A data table includes a caption  (<a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/H39">H39: Using caption elements to associate data table captions with data tables</a>) and a table summary/description. A table uses the appropriate <a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/H51">markups to present tabular information (H51)</a></p>
<p>Each data cell (<em>&lt;td&gt;</em>) inside needs to be represented by a minimum of two unique headings (<em>&lt;th&gt;</em>). Also, the table needs to be structured so that when it is rendered, for each row, there is the same number of columns (spanned or not). A <em>&lt;caption&gt;</em>, <em>&lt;thead&gt;</em> section, one or more <em>&lt;tbody&gt;</em> is required. The <em>&lt;tfoot&gt;</em> is optional and is the same as column grouping <em>&lt;colgroup&gt;</em>, <em>&lt;col&gt;</em>.</p>
<p>This is not about creating tables that are using <a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/H43">ID and headers attributes to associate data cells with header cells in data tables (H43)</a>. It is recommended to avoid those tables and <strong>to use</strong> basic tables, hierarchical headings or a table combined with multiple data row grouping (<em>&lt;tbody&gt;</em>) section.</p>
<h3>What&#8217;s best?</h3>
<p><strong>Data tables are best</strong> because the layout table solution can be more easily reproduced with the <em>&lt;div&gt;</em> element combined with the appropriate CSS.</p>
<h2>Graph and data table</h2>
<p>First, inside the graph plug-in, there is a &#8220;table parser&#8221; that requires you to create a well-structured table. If you don&#8217;t, the graphic you are trying to generate won&#8217;t be shown.</p>
<h3>What&#8217;s required?</h3>
<p>The minimal requirement is for each data cell (<em>&lt;td&gt;</em>) inside to be represented by at least two unique headings (<em>&lt;th&gt;</em>). The table needs to be structured so that when it is rendered, for each row, there is the same number of columns (spanned or not). A <em>&lt;caption&gt;</em>, <em>&lt;thead&gt;</em>, one or more <em>&lt;tbody&gt;</em>.</p>
<table class="lined widthFull">
<caption>My table caption</caption>
<thead>
<tr>
<th></th>
<th>Column 1</th>
</tr>
</thead>
<tbody>
<tr>
<th>Row 1</th>
<td>123</td>
</tr>
</tbody>
</table>
<pre><code class="html">
&lt;!-- Minimal table requirement --&gt;
&lt;table&gt;
   &lt;caption&gt;My table caption&lt;/caption&gt;
   &lt;thead&gt;
      &lt;tr&gt;
         &lt;th&gt;&lt;/th&gt;
         &lt;th&gt;Column 1&lt;/th&gt;
      &lt;/tr&gt;
   &lt;/thead&gt;
   &lt;tbody&gt;
      &lt;tr&gt;
         &lt;th&gt;Row 1&lt;/th&gt;
         &lt;td&gt;123&lt;/td&gt;
      &lt;/tr&gt;
   &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>
<h3>What&#8217;s supported?</h3>
<h4>Multiple data row grouping</h4>
<p>Each row grouping will generate a new graphic to the dataset.</p>
<pre><code class="html">
&lt;!-- Multiple tbody section --&gt;
&lt;!-- [..] --&gt;
   &lt;tbody&gt;
      &lt;tr&gt;
         &lt;!-- [..] --&gt;
      &lt;/tr&gt;
      &lt;!-- [..] --&gt;
   &lt;/tbody&gt;
   &lt;tbody&gt;
      &lt;tr&gt;
         &lt;!-- [..] --&gt;
      &lt;/tr&gt;
      &lt;!-- [..] --&gt;
   &lt;/tbody&gt;
&lt;!-- [..] --&gt;
</code></pre>
<h4>Hierarchical headings are <em>partially</em> supported</h4>
<table>
<caption>My table caption</caption>
<thead>
<tr>
<th colspan="2" rowspan="2"></th>
<th rowspan="2">Column 1</th>
<th colspan="2">Column 2</th>
</tr>
<tr>
<th>Column 2a</th>
<th>Column 2b</th>
</tr>
</thead>
<tbody>
<tr>
<th rowspan="2">Row 1</th>
<th>Row 1a</th>
<td>123</td>
<td>456</td>
<td>789</td>
</tr>
<tr>
<th>Row 1b</th>
<td>123</td>
<td>456</td>
<td>789</td>
</tr>
<tr>
<th colspan="2">Row 2</th>
<td>123</td>
<td>456</td>
<td>789</td>
</tr>
</tbody>
</table>
<pre><code class="html">
&lt;!-- Hierarchical heading table --&gt;
&lt;table&gt;
   &lt;caption&gt;My table caption&lt;/caption&gt;
   &lt;thead&gt;
      &lt;tr&gt;
         &lt;th colspan="2" rowspan="2"&gt;&lt;/th&gt;
         &lt;th rowspan="2"&gt;Column 1&lt;/th&gt;
         &lt;th colspan="2"&gt;Column 2&lt;/th&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;th&gt;Column 2a&lt;/th&gt;
         &lt;th&gt;Column 2b&lt;/th&gt;
      &lt;/tr&gt;
   &lt;/thead&gt;
   &lt;tbody&gt;
      &lt;tr&gt;
         &lt;th rowspan="2"&gt;Row 1&lt;/th&gt;
         &lt;th&gt;Row 1a&lt;/th&gt;
         &lt;td&gt;123&lt;/td&gt;
         &lt;td&gt;456&lt;/td&gt;
         &lt;td&gt;789&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;th&gt;Row 1b&lt;/th&gt;
         &lt;td&gt;123&lt;/td&gt;
         &lt;td&gt;456&lt;/td&gt;
         &lt;td&gt;789&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
         &lt;th colspan="2"&gt;Row 2&lt;/th&gt;
         &lt;td&gt;123&lt;/td&gt;
         &lt;td&gt;456&lt;/td&gt;
         &lt;td&gt;789&lt;/td&gt;
      &lt;/tr&gt;
   &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>
<h3>What&#8217;s not supported?</h3>
<p>For the <em>pie chart</em>, when generated, the table row hierarchy is not visually represented. If that kind of information is present inside the table, it will just be ignored. As for the table heading hierarchy, they are not visually represented inside the legend.</p>
<p>For the <em>2D axis graph</em> (line, bar, stacked, area), the table row hierarchy is not represented inside the legend.</p>
<p>The following table tags are currently ignored: <em>&lt;colgroup&gt;</em>, <em>&lt;col&gt;</em> and <em>&lt;tfoot&gt;</em>. The tfoot element will be supported in a future version.</p>
<h2>How to create a complex table?</h2>
<h3>Is ids/headers attribute are required ?</h3>
<p>Yes, it&#8217;s required until a sufficient technique will show how to use the row grouping method. Ids/headers was omited in the example in this documentation to keep it clear.</p>
<p>Historical, row grouping method was defined for viusal user agent when the table are printed. The row in the thead element are repeated on each printed page as table header and the row in the tfoot element are repeated on each printed page as table footer.</p>
<p>The graph plugin add value to the thead and tbody element by supporting the hiarchical heading. But because, at this time, no sufficient technique are showing how to use the row grouping method, <strong>ids/headers attribute are required</strong>.</p>
<p>Because of that confusion, three new sufficient techniques was submited to the WCAG working group,</p>
<ul>
<li><a href="http://lists.w3.org/Archives/Public/public-wcag2-techs/2012Jan/0001.html">HTML and XHTML Techniques &#8211; Using table row grouping to associate data cells with header cells in data tables</a></li>
<li><a href="http://lists.w3.org/Archives/Public/public-wcag2-techs/2012Jan/0002.html">HTML and XHTML Techniques &#8211; Identifying data group (tbody) in a data table</a></li>
<li><a href="http://lists.w3.org/Archives/Public/public-wcag2-techs/2012Jan/0003.html">HTML and XHTML Techniques &#8211; Using table row grouping to associate data cells with ids/headers</a></li>
</ul>
<p>Some investigation will be done later if ids/headers set by a script will remains WCAG 2.0 Level AA compliant.</p>
<h3>Simple table</h3>
<p>Before creating any complex table, you must know what a simple table is. There are those with row grouping, and those that do not require additional markups to make them accessible. Also, the <em>&lt;caption&gt;</em> element (table title) is always required See: <a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/H39">H39: Using caption elements to associate data table captions with data tables</a></p>
<h4>Without row grouping tags and without scope</h4>
<table>
<caption>A Simple table <strong>NOT</strong> WCAG 2.0</caption>
<tr>
<th>Col a</th>
<th>Col b</th>
<th>Col c</th>
<th>Col d</th>
</tr>
<tr>
<th>Row 1</th>
<td>Cell b1</td>
<td>Cell c1</td>
<td>Cell d1</td>
</tr>
<tr>
<th>Row 2</th>
<td>Cell b2</td>
<td>Cell c2</td>
<td>Cell d2</td>
</tr>
<tr>
<th>Row 3</th>
<td>Cell b3</td>
<td>Cell c3</td>
<td>Cell d3</td>
</tr>
</table>
<pre><code class="html">
&lt;!-- Simple table - NOT WCAG 2.0 --&gt;
&lt;table&gt;
	&lt;caption&gt;A Simple table &lt;strong&gt;NOT&lt;/strong&gt; WCAG 2.0&lt;/caption&gt;
	&lt;tr&gt;
		&lt;th&gt;Col a&lt;/th&gt;
		&lt;th&gt;Col b&lt;/th&gt;
		&lt;th&gt;Col c&lt;/th&gt;
		&lt;th&gt;Col d&lt;/th&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th&gt;Row 1&lt;/th&gt;
		&lt;td&gt;Cell b1&lt;/td&gt;
		&lt;td&gt;Cell c1&lt;/td&gt;
		&lt;td&gt;Cell d1&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th&gt;Row 2&lt;/th&gt;
		&lt;td&gt;Cell b2&lt;/td&gt;
		&lt;td&gt;Cell c2&lt;/td&gt;
		&lt;td&gt;Cell d2&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th&gt;Row 3&lt;/th&gt;
		&lt;td&gt;Cell b3&lt;/td&gt;
		&lt;td&gt;Cell c3&lt;/td&gt;
		&lt;td&gt;Cell d3&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
</code></pre>
<p>First that previous table is <strong>not WCAG 2.0</strong> compliant. This is because there is a confusion between the row heading and the column heading because they are inside the same container. see <a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/H79">H79: Identifying the purpose of a link using link text combined with its enclosing table cell and associated table headings</a></p>
<p>To make the table WCAG 2.0 compliant, we must scope the table headings and specify which heading is used, eg.</p>
<table>
<caption>A Simple table WCAG 2.0 using scope</caption>
<tr>
<th scope="col">Col a</th>
<th scope="col">Col b</th>
<th scope="col">Col c</th>
<th scope="col">Col d</th>
</tr>
<tr>
<th scope="row">Row 1</th>
<td>Cell b1</td>
<td>Cell c1</td>
<td>Cell d1</td>
</tr>
<tr>
<th scope="row">Row 2</th>
<td>Cell b2</td>
<td>Cell c2</td>
<td>Cell d2</td>
</tr>
<tr>
<th scope="row">Row 3</th>
<td>Cell b3</td>
<td>Cell c3</td>
<td>Cell d3</td>
</tr>
</table>
<pre><code class="html">
&lt;!-- Simple table - WCAG 2.0 --&gt;
&lt;table&gt;
	&lt;caption&gt;A Simple table WCAG 2.0 using scope&lt;/caption&gt;
	&lt;tr&gt;
		&lt;th scope="col"&gt;Col a&lt;/th&gt;
		&lt;th scope="col"&gt;Col b&lt;/th&gt;
		&lt;th scope="col"&gt;Col c&lt;/th&gt;
		&lt;th scope="col"&gt;Col d&lt;/th&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope="row"&gt;Row 1&lt;/th&gt;
		&lt;td&gt;Cell b1&lt;/td&gt;
		&lt;td&gt;Cell c1&lt;/td&gt;
		&lt;td&gt;Cell d1&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope="row"&gt;Row 2&lt;/th&gt;
		&lt;td&gt;Cell b2&lt;/td&gt;
		&lt;td&gt;Cell c2&lt;/td&gt;
		&lt;td&gt;Cell d2&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope="row"&gt;Row 3&lt;/th&gt;
		&lt;td&gt;Cell b3&lt;/td&gt;
		&lt;td&gt;Cell c3&lt;/td&gt;
		&lt;td&gt;Cell d3&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
</code></pre>
<p>The previous tables are WCAG 2.0, scoped tables are currently not supported by the graph plug-in, and won&#8217;t be in any near future.</p>
<h4>With row grouping tag</h4>
<p>Here, there is no requirement to use the heading scope, because the row grouping defines exactly the purpose of the <em>&lt;th&gt;</em> element.</p>
<table>
<caption>A Simple table WCAG 2.0 using row grouping</caption>
<thead>
<tr>
<th>Col a</th>
<th>Col b</th>
<th>Col c</th>
<th>Col d</th>
</tr>
</thead>
<tbody>
<tr>
<th>Row 1</th>
<td>Cell b1</td>
<td>Cell c1</td>
<td>Cell d1</td>
</tr>
<tr>
<th>Row 2</th>
<td>Cell b2</td>
<td>Cell c2</td>
<td>Cell d2</td>
</tr>
<tr>
<th>Row 3</th>
<td>Cell b3</td>
<td>Cell c3</td>
<td>Cell d3</td>
</tr>
</tbody>
</table>
<pre><code class="html">
&lt;!-- Simple table - WCAG 2.0 --&gt;
&lt;table&gt;
	&lt;caption&gt;A Simple table WCAG 2.0 using row grouping&lt;/caption&gt;
	&lt;thead&gt;
		&lt;tr&gt;
			&lt;th&gt;Col a&lt;/th&gt;
			&lt;th&gt;Col b&lt;/th&gt;
			&lt;th&gt;Col c&lt;/th&gt;
			&lt;th&gt;Col d&lt;/th&gt;
		&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 1&lt;/th&gt;
			&lt;td&gt;Cell b1&lt;/td&gt;
			&lt;td&gt;Cell c1&lt;/td&gt;
			&lt;td&gt;Cell d1&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 2&lt;/th&gt;
			&lt;td&gt;Cell b2&lt;/td&gt;
			&lt;td&gt;Cell c2&lt;/td&gt;
			&lt;td&gt;Cell d2&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 3&lt;/th&gt;
			&lt;td&gt;Cell b3&lt;/td&gt;
			&lt;td&gt;Cell c3&lt;/td&gt;
			&lt;td&gt;Cell d3&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
</code></pre>
<p>As you can see, the <em>&lt;thead&gt;</em> section defines the table column heading, and the <em>&lt;tbody&gt;</em> section defines the data cell.</p>
<p>This is about the most simple table supported by the graph plug-in. The plug-in interprets any <em>&lt;tr&gt;</em> as a serie.</p>
<h3>Hierarchical table</h3>
<h4>Without row grouping tag and without scope</h4>
<table>
<caption>A Hierarchical table <strong>NOT</strong> WCAG 2.0</caption>
<tr>
<th colspan="2" rowspan="2">Col a</th>
<th colspan="2">Col b</th>
<th colspan="2">Col c</th>
</tr>
<tr>
<th>Col b-a</th>
<th>Col b-b</th>
<th>Col c-a</th>
<th>Col c-b</th>
</tr>
<tr>
<th rowspan="2">Row 1</th>
<th>Row 1-1</th>
<td>Cell b-a-1</td>
<td>Cell b-b-1</td>
<td>Cell c-a-1</td>
<td>Cell c-b-1</td>
</tr>
<tr>
<th>Row 1-2</th>
<td>Cell b-a-1-2</td>
<td>Cell b-b-1-2</td>
<td>Cell c-a-1-2</td>
<td>Cell c-b-1-2</td>
</tr>
<tr>
<th rowspan="2">Row 2</th>
<th>Row 2-1</th>
<td>Cell b-a-2-1</td>
<td>Cell b-b-2-1</td>
<td>Cell c-a-2-1</td>
<td>Cell c-b-2-1</td>
</tr>
<tr>
<th>Row 2-2</th>
<td>Cell b-a-2-2</td>
<td>Cell b-b-2-2</td>
<td>Cell c-a-2-2</td>
<td>Cell c-b-2-2</td>
</tr>
</table>
<pre><code class="html">
&lt;!-- Hierarchical table - NOT WCAG 2.0 --&gt;
&lt;table&gt;
	&lt;caption&gt;A Hierarchical table &lt;strong&gt;NOT&lt;/strong&gt; WCAG 2.0&lt;/caption&gt;
	&lt;tr&gt;
		&lt;th colspan="2" rowspan="2"&gt;Col a&lt;/th&gt;
		&lt;th colspan="2"&gt;Col b&lt;/th&gt;
		&lt;th colspan="2"&gt;Col c&lt;/th&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th&gt;Col b-a&lt;/th&gt;
		&lt;th&gt;Col b-b&lt;/th&gt;
		&lt;th&gt;Col c-a&lt;/th&gt;
		&lt;th&gt;Col c-b&lt;/th&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th rowspan="2"&gt;Row 1&lt;/th&gt;
		&lt;th&gt;Row 1-1&lt;/th&gt;
		&lt;td&gt;Cell b-a-1&lt;/td&gt;
		&lt;td&gt;Cell b-b-1&lt;/td&gt;
		&lt;td&gt;Cell c-a-1&lt;/td&gt;
		&lt;td&gt;Cell c-b-1&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th&gt;Row 1-2&lt;/th&gt;
		&lt;td&gt;Cell b-a-1-2&lt;/td&gt;
		&lt;td&gt;Cell b-b-1-2&lt;/td&gt;
		&lt;td&gt;Cell c-a-1-2&lt;/td&gt;
		&lt;td&gt;Cell c-b-1-2&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th rowspan="2"&gt;Row 2&lt;/th&gt;
		&lt;th&gt;Row 2-1&lt;/th&gt;
		&lt;td&gt;Cell b-a-2-1&lt;/td&gt;
		&lt;td&gt;Cell b-b-2-1&lt;/td&gt;
		&lt;td&gt;Cell c-a-2-1&lt;/td&gt;
		&lt;td&gt;Cell c-b-2-1&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th&gt;Row 2-2&lt;/th&gt;
		&lt;td&gt;Cell b-a-2-2&lt;/td&gt;
		&lt;td&gt;Cell b-b-2-2&lt;/td&gt;
		&lt;td&gt;Cell c-a-2-2&lt;/td&gt;
		&lt;td&gt;Cell c-b-2-2&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
</code></pre>
<p>Do not use that kind of table. It may be clear for the end-user, but it&#8217;s impossible to get the heading relation at all because <em>&lt;th&gt;</em> are used in four different purposes, such as column grouping, column, row grouping and row. See with the scope what can be done.</p>
<h4>With scope</h4>
<table>
<caption>A Hierarchical table WCAG 2.0 using scope</caption>
<tr>
<th scope="colgroup" colspan="2" rowspan="2">Col a</th>
<th scope="colgroup" colspan="2">Col b</th>
<th scope="colgroup" colspan="2">Col c</th>
</tr>
<tr>
<th scope="col">Col b-a</th>
<th scope="col">Col b-b</th>
<th scope="col">Col c-a</th>
<th scope="col">Col c-b</th>
</tr>
<tr>
<th scope="rowgroup" rowspan="2">Row 1</th>
<th scope="row">Row 1-1</th>
<td>Cell b-a-1</td>
<td>Cell b-b-1</td>
<td>Cell c-a-1</td>
<td>Cell c-b-1</td>
</tr>
<tr>
<th scope="row">Row 1-2</th>
<td>Cell b-a-1-2</td>
<td>Cell b-b-1-2</td>
<td>Cell c-a-1-2</td>
<td>Cell c-b-1-2</td>
</tr>
<tr>
<th scope="rowgroup" rowspan="2">Row 2</th>
<th scope="row">Row 2-1</th>
<td>Cell b-a-2-1</td>
<td>Cell b-b-2-1</td>
<td>Cell c-a-2-1</td>
<td>Cell c-b-2-1</td>
</tr>
<tr>
<th scope="row">Row 2-2</th>
<td>Cell b-a-2-2</td>
<td>Cell b-b-2-2</td>
<td>Cell c-a-2-2</td>
<td>Cell c-b-2-2</td>
</tr>
</table>
<pre><code class="html">
&lt;!-- Hierarchical table --&gt;
&lt;table&gt;
	&lt;caption&gt;A Hierarchical table WCAG 2.0 using scope&lt;/caption&gt;
	&lt;tr&gt;
		&lt;th scope="colgroup" colspan="2" rowspan="2"&gt;Col a&lt;/th&gt;
		&lt;th scope="colgroup" colspan="2"&gt;Col b&lt;/th&gt;
		&lt;th scope="colgroup" colspan="2"&gt;Col c&lt;/th&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope="col"&gt;Col b-a&lt;/th&gt;
		&lt;th scope="col"&gt;Col b-b&lt;/th&gt;
		&lt;th scope="col"&gt;Col c-a&lt;/th&gt;
		&lt;th scope="col"&gt;Col c-b&lt;/th&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope="rowgroup" rowspan="2"&gt;Row 1&lt;/th&gt;
		&lt;th scope="row"&gt;Row 1-1&lt;/th&gt;
		&lt;td&gt;Cell b-a-1&lt;/td&gt;
		&lt;td&gt;Cell b-b-1&lt;/td&gt;
		&lt;td&gt;Cell c-a-1&lt;/td&gt;
		&lt;td&gt;Cell c-b-1&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope="row"&gt;Row 1-2&lt;/th&gt;
		&lt;td&gt;Cell b-a-1-2&lt;/td&gt;
		&lt;td&gt;Cell b-b-1-2&lt;/td&gt;
		&lt;td&gt;Cell c-a-1-2&lt;/td&gt;
		&lt;td&gt;Cell c-b-1-2&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope="rowgroup" rowspan="2"&gt;Row 2&lt;/th&gt;
		&lt;th scope="row"&gt;Row 2-1&lt;/th&gt;
		&lt;td&gt;Cell b-a-2-1&lt;/td&gt;
		&lt;td&gt;Cell b-b-2-1&lt;/td&gt;
		&lt;td&gt;Cell c-a-2-1&lt;/td&gt;
		&lt;td&gt;Cell c-b-2-1&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;th scope="row"&gt;Row 2-2&lt;/th&gt;
		&lt;td&gt;Cell b-a-2-2&lt;/td&gt;
		&lt;td&gt;Cell b-b-2-2&lt;/td&gt;
		&lt;td&gt;Cell c-a-2-2&lt;/td&gt;
		&lt;td&gt;Cell c-b-2-2&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
</code></pre>
<p>The previous example show the limit of the scope attribute. But you will see them into a different context by using the row grouping.</p>
<p>The previous tables are WCAG 2.0, scoped tables are currently not supported by the graph plug-in, and won&#8217;t be in any near future.</p>
<h4>With row grouping tag</h4>
<table>
<caption>A Hierarchical table WCAG 2.0 using row grouping </caption>
<thead>
<tr>
<th colspan="2" rowspan="2">Col a</th>
<th colspan="2">Col b</th>
<th colspan="2">Col c</th>
</tr>
<tr>
<th>Col b-a</th>
<th>Col b-b</th>
<th>Col c-a</th>
<th>Col c-b</th>
</tr>
</thead>
<tbody>
<tr>
<th rowspan="2">Row 1</th>
<th>Row 1-1</th>
<td>Cell b-a-1</td>
<td>Cell b-b-1</td>
<td>Cell c-a-1</td>
<td>Cell c-b-1</td>
</tr>
<tr>
<th>Row 1-2</th>
<td>Cell b-a-1-2</td>
<td>Cell b-b-1-2</td>
<td>Cell c-a-1-2</td>
<td>Cell c-b-1-2</td>
</tr>
<tr>
<th rowspan="2">Row 2</th>
<th>Row 2-1</th>
<td>Cell b-a-2-1</td>
<td>Cell b-b-2-1</td>
<td>Cell c-a-2-1</td>
<td>Cell c-b-2-1</td>
</tr>
<tr>
<th>Row 2-2</th>
<td>Cell b-a-2-2</td>
<td>Cell b-b-2-2</td>
<td>Cell c-a-2-2</td>
<td>Cell c-b-2-2</td>
</tr>
</tbody>
</table>
<pre><code class="html">
&lt;!-- Hierarchical table - WCAG 2.0 using row grouping --&gt;
&lt;table&gt;
	&lt;caption&gt;A Hierarchical table WCAG 2.0 using row grouping &lt;/caption&gt;
	&lt;thead&gt;
		&lt;tr&gt;
			&lt;th colspan="2" rowspan="2"&gt;Col a&lt;/th&gt;
			&lt;th colspan="2"&gt;Col b&lt;/th&gt;
			&lt;th colspan="2"&gt;Col c&lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Col b-a&lt;/th&gt;
			&lt;th&gt;Col b-b&lt;/th&gt;
			&lt;th&gt;Col c-a&lt;/th&gt;
			&lt;th&gt;Col c-b&lt;/th&gt;
		&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;th rowspan="2"&gt;Row 1&lt;/th&gt;
			&lt;th&gt;Row 1-1&lt;/th&gt;
			&lt;td&gt;Cell b-a-1&lt;/td&gt;
			&lt;td&gt;Cell b-b-1&lt;/td&gt;
			&lt;td&gt;Cell c-a-1&lt;/td&gt;
			&lt;td&gt;Cell c-b-1&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 1-2&lt;/th&gt;
			&lt;td&gt;Cell b-a-1-2&lt;/td&gt;
			&lt;td&gt;Cell b-b-1-2&lt;/td&gt;
			&lt;td&gt;Cell c-a-1-2&lt;/td&gt;
			&lt;td&gt;Cell c-b-1-2&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th rowspan="2"&gt;Row 2&lt;/th&gt;
			&lt;th&gt;Row 2-1&lt;/th&gt;
			&lt;td&gt;Cell b-a-2-1&lt;/td&gt;
			&lt;td&gt;Cell b-b-2-1&lt;/td&gt;
			&lt;td&gt;Cell c-a-2-1&lt;/td&gt;
			&lt;td&gt;Cell c-b-2-1&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 2-2&lt;/th&gt;
			&lt;td&gt;Cell b-a-2-2&lt;/td&gt;
			&lt;td&gt;Cell b-b-2-2&lt;/td&gt;
			&lt;td&gt;Cell c-a-2-2&lt;/td&gt;
			&lt;td&gt;Cell c-b-2-2&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
</code></pre>
<p>With this method, you are able to set many grouping headers (as row or column) without loosing any information or context. That is the kind of tables used by graph plug-in.</p>
<h2>Multiple <em>&lt;tbody&gt;</em>, how?</h2>
<p>As per the table specification, there are three tags available to create row groupings and two tags available to create column grouping.</p>
<h3>Respect the order</h3>
<p>The table grouping tags need to respect the following sequence.</p>
<ol>
<li><em>&lt;caption&gt;</em></li>
<li><em>&lt;colgroup&gt;</em> <strong>if there is no span attribute, its column child is required</strong> (Repeat as needed)
<ol>
<li><em>&lt;col&gt;</em> <strong>child of colgroup</strong></li>
</ol>
</li>
<li><em>&lt;thead&gt;</em></li>
<li><em>&lt;tfoot&gt;</em></li>
<li><em>&lt;tbody&gt;</em>  (Repeat as needed)</li>
</ol>
<h3>How to use multiple <em>&lt;tbody&gt;</em> or/and <em>&lt;colgroup&gt;</em></h3>
<table>
<caption>Multiple tbody WCAG 2.0 using row grouping</caption>
<thead>
<tr>
<th>Col a</th>
<th>Col b</th>
<th>Col c</th>
<th>Col d</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="rowgroup" colspan="4">First Group</th>
</tr>
<tr>
<th>Row 1</th>
<td>Cell b1</td>
<td>Cell c1</td>
<td>Cell d1</td>
</tr>
<tr>
<th>Row 2</th>
<td>Cell b2</td>
<td>Cell c2</td>
<td>Cell d2</td>
</tr>
<tr>
<th>Row 3</th>
<td>Cell b3</td>
<td>Cell c3</td>
<td>Cell d3</td>
</tr>
</tbody>
<tbody>
<tr>
<th scope="rowgroup" colspan="4">Second Group</th>
</tr>
<tr>
<th>Row 1</th>
<td>Cell b1</td>
<td>Cell c1</td>
<td>Cell d1</td>
</tr>
<tr>
<th>Row 2</th>
<td>Cell b2</td>
<td>Cell c2</td>
<td>Cell d2</td>
</tr>
<tr>
<th>Row 3</th>
<td>Cell b3</td>
<td>Cell c3</td>
<td>Cell d3</td>
</tr>
</tbody>
</table>
<pre><code class="html">
&lt;!-- Multiple tbody - WCAG 2.0 --&gt;
&lt;table&gt;
	&lt;caption&gt;Multiple tbody WCAG 2.0 using row grouping&lt;/caption&gt;
	&lt;thead&gt;
		&lt;tr&gt;
			&lt;th&gt;Col a&lt;/th&gt;
			&lt;th&gt;Col b&lt;/th&gt;
			&lt;th&gt;Col c&lt;/th&gt;
			&lt;th&gt;Col d&lt;/th&gt;
		&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;th scope="rowgroup" colspan="4"&gt;First Group&lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 1&lt;/th&gt;
			&lt;td&gt;Cell b1&lt;/td&gt;
			&lt;td&gt;Cell c1&lt;/td&gt;
			&lt;td&gt;Cell d1&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 2&lt;/th&gt;
			&lt;td&gt;Cell b2&lt;/td&gt;
			&lt;td&gt;Cell c2&lt;/td&gt;
			&lt;td&gt;Cell d2&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 3&lt;/th&gt;
			&lt;td&gt;Cell b3&lt;/td&gt;
			&lt;td&gt;Cell c3&lt;/td&gt;
			&lt;td&gt;Cell d3&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;th scope="rowgroup" colspan="4"&gt;Second Group&lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 1&lt;/th&gt;
			&lt;td&gt;Cell b1&lt;/td&gt;
			&lt;td&gt;Cell c1&lt;/td&gt;
			&lt;td&gt;Cell d1&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 2&lt;/th&gt;
			&lt;td&gt;Cell b2&lt;/td&gt;
			&lt;td&gt;Cell c2&lt;/td&gt;
			&lt;td&gt;Cell d2&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 3&lt;/th&gt;
			&lt;td&gt;Cell b3&lt;/td&gt;
			&lt;td&gt;Cell c3&lt;/td&gt;
			&lt;td&gt;Cell d3&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
</code></pre>
<p>As you can see, each <em>&lt;tbody&gt;</em> group can be identified by using the scope &#8220;rowgroup&#8221;. In this specific case, only one <em>&lt;th&gt;</em> element can have the scope &#8220;rowgroup&#8221; because any other will create a confusion in the same group.</p>
<p>The <a href="http://dev.w3.org/html5/spec/Overview.html#header-and-data-cell-semantics">HTML5 specification</a> require the scope to identifying the group.</p>
<p>As the sufficient technique <a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/G57">G57: Ordering the content in a meaningful sequence</a> the group identifier may be the first cell heading.</p>
<p>Remember, you can still have hierarchical information inside that kind of table structure.</p>
<h3>Column grouping</h3>
<p>The <em>&lt;colgroup&gt;</em> and <em>&lt;col&gt;</em> are there to represent similar functionality of row grouping. So far, I have not seen any special visual support for those tags, but it can be a good idea for a new project in the future, eg. supporting their generic attributes as <em>class</em>.</p>
<h3>Conclusion</h3>
<p>The &#8220;header&#8221; attribute was not mentioned and use of &#8220;scope&#8221; inside a complex table are not recommended. This is because the same can be easily done by using the row grouping, col grouping and the hierarchical heading. If you can&#8217;t use that kind of format and you need to use &#8220;header&#8221; and &#8220;id&#8221; attribute,  ask yourself this question : <strong>Does my table make sense when it&#8217;s linearized?</strong></p>
<h2>How to create a summary/description table in HTML 5, and why it is important ?</h2>
<p>It depends on how your table is structured and how your content is orgranized inside the table. If the table is built right (see the W3C citation bellow) the description becomes optional. If you need or want to add a table description, there are two techniques based on the table context.</p>
<h3>Table context</h3>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#table-descriptions-techniques">HTML5 &#8211; 4.9.1.1 Techniques for describing tables</a></p>
<ul>
<li>Add the description in a paragraph <em>&lt;p&gt;</em> just before the <em>&lt;table&gt;</em> element. In prose, surrounding the table, or</li>
<li>Add the description inside the <em>&lt;caption&gt;</em> element</li>
<li>The best option, of course, rather than writing a description explaining the way the table is laid out, is to adjust the table so that no explanation is needed. <em>(citation from W3C Editor&#8217;s Draft)</em></li>
</ul>
<h3>Describe the table by using the <em>Collapse plug-in</em></h3>
<table>
<caption>A Simple table with description WCAG 2.0 using row grouping</p>
<div class="toggle-content collapse">
<p class="expandtitle">Description</p>
<p>Description example for a simple table</p>
</p></div>
</caption>
<thead>
<tr>
<th>Col a</th>
<th>Col b</th>
<th>Col c</th>
<th>Col d</th>
</tr>
</thead>
<tbody>
<tr>
<th>Row 1</th>
<td>Cell b1</td>
<td>Cell c1</td>
<td>Cell d1</td>
</tr>
<tr>
<th>Row 2</th>
<td>Cell b2</td>
<td>Cell c2</td>
<td>Cell d2</td>
</tr>
<tr>
<th>Row 3</th>
<td>Cell b3</td>
<td>Cell c3</td>
<td>Cell d3</td>
</tr>
</tbody>
</table>
<pre><code class="html">
&lt;!-- Simple table with description - WCAG 2.0 --&gt;
&lt;table&gt;
	&lt;caption&gt;A Simple table with description WCAG 2.0 using row grouping
		&lt;div class="toggle-content collapse"&gt;
			&lt;p class="expandtitle"&gt;Description&lt;/p&gt;
			&lt;p&gt;Description example for a simple table&lt;/p&gt;
		&lt;/div&gt;
	&lt;/caption&gt;
	&lt;thead&gt;
		&lt;tr&gt;
			&lt;th&gt;Col a&lt;/th&gt;
			&lt;th&gt;Col b&lt;/th&gt;
			&lt;th&gt;Col c&lt;/th&gt;
			&lt;th&gt;Col d&lt;/th&gt;
		&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 1&lt;/th&gt;
			&lt;td&gt;Cell b1&lt;/td&gt;
			&lt;td&gt;Cell c1&lt;/td&gt;
			&lt;td&gt;Cell d1&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 2&lt;/th&gt;
			&lt;td&gt;Cell b2&lt;/td&gt;
			&lt;td&gt;Cell c2&lt;/td&gt;
			&lt;td&gt;Cell d2&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 3&lt;/th&gt;
			&lt;td&gt;Cell b3&lt;/td&gt;
			&lt;td&gt;Cell c3&lt;/td&gt;
			&lt;td&gt;Cell d3&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
</code></pre>
<p>Or by using the HTML 5 tag, </p>
<table>
<caption>A Simple table with description WCAG 2.0 using row grouping</p>
<details>
<summary>Description</summary>
<p>Description example for a simple table</p>
</details>
</caption>
<thead>
<tr>
<th>Col a</th>
<th>Col b</th>
<th>Col c</th>
<th>Col d</th>
</tr>
</thead>
<tbody>
<tr>
<th>Row 1</th>
<td>Cell b1</td>
<td>Cell c1</td>
<td>Cell d1</td>
</tr>
<tr>
<th>Row 2</th>
<td>Cell b2</td>
<td>Cell c2</td>
<td>Cell d2</td>
</tr>
<tr>
<th>Row 3</th>
<td>Cell b3</td>
<td>Cell c3</td>
<td>Cell d3</td>
</tr>
</tbody>
</table>
<pre><code class="html">
&lt;!-- Simple table with description - WCAG 2.0 --&gt;
&lt;table&gt;
	&lt;caption&gt;A Simple table with description WCAG 2.0 using row grouping
		&lt;details&gt;
			&lt;summary&gt;Description&lt;/summary&gt;
			&lt;p&gt;Description example for a simple table&lt;/p&gt;
		&lt;/details&gt;
	&lt;/caption&gt;
	&lt;thead&gt;
		&lt;tr&gt;
			&lt;th&gt;Col a&lt;/th&gt;
			&lt;th&gt;Col b&lt;/th&gt;
			&lt;th&gt;Col c&lt;/th&gt;
			&lt;th&gt;Col d&lt;/th&gt;
		&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 1&lt;/th&gt;
			&lt;td&gt;Cell b1&lt;/td&gt;
			&lt;td&gt;Cell c1&lt;/td&gt;
			&lt;td&gt;Cell d1&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 2&lt;/th&gt;
			&lt;td&gt;Cell b2&lt;/td&gt;
			&lt;td&gt;Cell c2&lt;/td&gt;
			&lt;td&gt;Cell d2&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 3&lt;/th&gt;
			&lt;td&gt;Cell b3&lt;/td&gt;
			&lt;td&gt;Cell c3&lt;/td&gt;
			&lt;td&gt;Cell d3&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
</code></pre>
<p>You can see more examples in the HTML5 draft, like how to describe a figure. <a href="http://dev.w3.org/html5/spec/Overview.html#table-descriptions-techniques">HTML5 &#8211; 4.9.1.1 Techniques for describing tables</a></p>
<h2>How to describe a table header <em>&lt;th&gt;</em></h2>
<p>Sometimes, columns and rows need to be described.</p>
<p>The column heading description is located inside the <em>&lt;thead&gt;</em> element in a row below the header to describe. The row header description is in a column next to the header to describe. We use <em>&lt;td&gt;</em> element to insert the heading description.</p>
<table>
<caption>Describe a table header</caption>
<thead>
<tr>
<th rowspan="2" colspan="2">Col a</th>
<th>Col b</th>
<th>Col c</th>
<th>Col d</th>
</tr>
<tr>
<td>Description of Col b</td>
<td>Description of Col c</td>
<td>Description of Col d</td>
</tr>
</thead>
<tbody>
<tr>
<th>Row 1</th>
<td>Description of Row 1</td>
<td>Cell b1</td>
<td>Cell c1</td>
<td>Cell d1</td>
</tr>
<tr>
<th>Row 2</th>
<td>Description of Row 2</td>
<td>Cell b2</td>
<td>Cell c2</td>
<td>Cell d2</td>
</tr>
<tr>
<th>Row 3</th>
<td>Description of Row 3</td>
<td>Cell b3</td>
<td>Cell c3</td>
<td>Cell d3</td>
</tr>
</tbody>
</table>
<pre><code class="html">
&lt;!-- Describe a table header - WCAG 2.0 --&gt;
&lt;table&gt;
	&lt;caption&gt;Describe a table header&lt;/caption&gt;
	&lt;thead&gt;
		&lt;tr&gt;
			&lt;th rowspan="2" colspan="2"&gt;Col a&lt;/th&gt;
			&lt;th&gt;Col b&lt;/th&gt;
			&lt;th&gt;Col c&lt;/th&gt;
			&lt;th&gt;Col d&lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt;Description of Col b&lt;/td&gt;
			&lt;td&gt;Description of Col c&lt;/td&gt;
			&lt;td&gt;Description of Col d&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 1&lt;/th&gt;
			&lt;td&gt;Description of Row 1&lt;/td&gt;
			&lt;td&gt;Cell b1&lt;/td&gt;
			&lt;td&gt;Cell c1&lt;/td&gt;
			&lt;td&gt;Cell d1&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 2&lt;/th&gt;
			&lt;td&gt;Description of Row 2&lt;/td&gt;
			&lt;td&gt;Cell b2&lt;/td&gt;
			&lt;td&gt;Cell c2&lt;/td&gt;
			&lt;td&gt;Cell d2&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;th&gt;Row 3&lt;/th&gt;
			&lt;td&gt;Description of Row 3&lt;/td&gt;
			&lt;td&gt;Cell b3&lt;/td&gt;
			&lt;td&gt;Cell c3&lt;/td&gt;
			&lt;td&gt;Cell d3&lt;/td&gt;
		&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
</code></pre>
<h2>Table cell merging</h2>
<p>The graph plug-in support cells merged (a <em>td</em> and/or <em>th</em> with a rowspan and/or colspan greater than 1).</p>
<p>What happened to the generated graphic? Nothing special. The cells merged are interpreted as a way to display the data in a nicer way inside the table.</p>
<p>See the above table, both are equivalent and produce the same result.</p>
<table class="wet-graph wb-graph-width-402">
<caption>Cell and table header, with rowspan and colspan greater than 1</caption>
<thead>
<tr>
<th colspan="2"></th>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
</thead>
<tbody class="wb-graph-bar">
<tr>
<th rowspan="2">Row Grouping</th>
<th>Row 1</th>
<td colspan="2" rowspan="2">123</td>
<td rowspan="2">0</td>
</tr>
<tr>
<th>Row 2</th>
</tr>
</tbody>
</table>
<pre><code class="html">
&lt;!-- Table cell merged - WCAG 2.0 --&gt;

&lt;table class="wet-graph wb-graph-width-402"&gt;
 &lt;caption&gt;Cell and table header, with rowspan and colspan greater than 1&lt;/caption&gt;
 &lt;thead&gt;
  &lt;tr&gt;
   &lt;th colspan="2"&gt;&lt;/th&gt;
   &lt;th&gt;Column 1&lt;/th&gt;
   &lt;th&gt;Column 2&lt;/th&gt;
   &lt;th&gt;Column 3&lt;/th&gt;
  &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody class="wb-graph-bar"&gt;
  &lt;tr&gt;
   &lt;th rowspan="2"&gt;Row Grouping&lt;/th&gt;
   &lt;th&gt;Row 1&lt;/th&gt;
   &lt;td colspan="2" rowspan="2"&gt;123&lt;/td&gt;
   &lt;td rowspan="2"&gt;0&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;th&gt;Row 2&lt;/th&gt;
  &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
</code></pre>
<p><strong>are equivalent to</strong></p>
<table class="wet-graph wb-graph-width-402">
<caption>Cell and table header, interpretated by the graph plug-in</caption>
<thead>
<tr>
<th colspan="2"></th>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
</tr>
</thead>
<tbody class="wb-graph-bar">
<tr>
<th rowspan="2">Row Grouping</th>
<th>Row 1</th>
<td>123</td>
<td>123</td>
<td>0</td>
</tr>
<tr>
<th>Row 2</th>
<td>123</td>
<td>123</td>
<td>0</td>
</tr>
</tbody>
</table>
<pre><code class="html">
&lt;table class="wet-graph wb-graph-width-402"&gt;
 &lt;caption&gt;Cell and table header, interpretated by the graph plug-in&lt;/caption&gt;
 &lt;thead&gt;
  &lt;tr&gt;
   &lt;th colspan="2"&gt;&lt;/th&gt;
   &lt;th&gt;Column 1&lt;/th&gt;
   &lt;th&gt;Column 2&lt;/th&gt;
   &lt;th&gt;Column 3&lt;/th&gt;
  &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody class="wb-graph-bar"&gt;
  &lt;tr&gt;
   &lt;th rowspan="2"&gt;Row Grouping&lt;/th&gt;
   &lt;th&gt;Row 1&lt;/th&gt;
   &lt;td&gt;123&lt;/td&gt;
   &lt;td&gt;123&lt;/td&gt;
   &lt;td&gt;0&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;th&gt;Row 2&lt;/th&gt;
   &lt;td&gt;123&lt;/td&gt;
   &lt;td&gt;123&lt;/td&gt;
   &lt;td&gt;0&lt;/td&gt;
  &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;

</code></pre>
<h2>Relevant documentation</h2>
<ul>
<li><a href="http://dev.w3.org/html5/spec/Overview.html#tabular-data">HTML5 &#8211; 4.9 Tabular data</a></li>
<li><a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/H51">H51: Using table markup to present tabular information</a></li>
<li><a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/H39">H39: Using caption elements to associate data table captions with data tables</a></li>
<li><a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/H73">H73: Using the summary attribute of the table element to give an overview of data tables</a></li>
<li><a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/H63">H63: Using the scope attribute to associate header cells and data cells in data tables</a></li>
<li><a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/H43">H43: Using id and headers attributes to associate data cells with header cells in data tables</a></li>
<li><a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/H79">H79: Identifying the purpose of a link using link text combined with its enclosing table cell and associated table headings</a></li>
<li><a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/F34">F34: Failure of Success Criterion 1.3.1 and 1.3.2 due to using white space characters to format tables in plain text content</a></li>
<li><a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/F49">F49: Failure of Success Criterion 1.3.2 due to using an HTML layout table that does not make sense when linearized</a></li>
<li><a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/F46">F46: Failure of Success Criterion 1.3.1 due to using th elements, caption elements, or non-empty summary attributes in layout tables</a></li>
<li><a href="http://www.w3.org/TR/2010/NOTE-WCAG20-TECHS-20101014/G57">G57: Ordering the content in a meaningful sequence</a></li>
<li><a href="http://www.w3.org/WAI/GL/2011/WD-WCAG20-TECHS-20110621/">Techniques for WCAG 2.0 &#8211; W3C Editor&#8217;s Draft</a></li>
<li><a href="http://lists.w3.org/Archives/Public/public-wcag2-techs/2012Jan/0001.html">Submitted technique &#8211; HTML and XHTML Techniques &#8211; Using table row grouping to associate data cells with header cells in data tables</a></li>
<li><a href="http://lists.w3.org/Archives/Public/public-wcag2-techs/2012Jan/0002.html">Submitted technique &#8211; HTML and XHTML Techniques &#8211; Identifying data group (tbody) in a data table</a></li>
<li><a href="http://lists.w3.org/Archives/Public/public-wcag2-techs/2012Jan/0003.html">Submitted technique &#8211; HTML and XHTML Techniques &#8211; Using table row grouping to associate data cells with ids/headers</a></li>
<li><a href="http://www.tbs-sct.gc.ca/ws-nw/wa-aw/mwsa-rswa/table-eng.asp">Improving the accessibility of tables</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.pdprogrammeur.com/?feed=rss2&#038;p=1</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

