27.5.1 Understanding how the ColGroup property works
When you designate a header cell as a ColGroup cell, the effect of that property on the table depends on which accessibility method you have specified:
Using the scope method automatically specifies ColGroupElements=Yes; the ColGroup cell starts a new <colgroup> element; and the ColGroup cell’s information applies to all cells subsumed by that element.
ColGroupElements=Yes is a necessary condition for scope="colgroup", but not for id/headers="groupN"; for the latter, the ColGroupElements value does not affect which cells are marked id/headers="groupN".
ColGroupIDs=Yes is a necessary condition for id/headers="groupN", but not for scope="colgroup"; for the latter, the ColGroupIDs value does not affect which cells are subsumed under scope="colgroup".
Table 27-3 summarizes the effects of the ColGroup property when combined with these settings.
Table 27-3 ColGroup property effects
* Set via CellScope marker or [HTMLParaStyles]fmt=Scope, [HtmlStyleCellScope]fmt=colgroup |
|||||||||
If ColGroupElements=Yes, each ColGroup cell starts a new <colgroup> element. If the ColGroup cell contains a CellScope marker (or the [HTMLParaStyles]/[StyleCellScope] equivalent) that sets the scope="colgroup" attribute, the ColGroup property works in concert with the scope attribute to apply the ColGroup header to all cells subsumed by its <colgroup>. The scope attribute is in effect only within the same <colgroup> section as the ColGroup cell. See §27.2 Using the scope method to identify table cells.
If ColGroupIDs=Yes, each ColGroup cell gets an id="groupN" attribute; cells below the header cell and to the right of the header-cell column, across to the next ColGroup header cell or to the edge of the table (see Figure 27-1), each get a matching headers="groupN" attribute. If ColGroupElements=Yes, these are the cells subsumed by the <colgroup> element. See §27.3.3 Grouping header cells for identification.
> 27 Marking HTML table cells for WAI > 27.5 Using ColGroup and RowGroup cells > 27.5.1 Understanding how the ColGroup property works