You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by bu...@apache.org on 2012/09/26 20:27:43 UTC

svn commit: r833094 - in /websites/staging/xmlgraphics/trunk/content: ./ fop/trunk/accessibility.html

Author: buildbot
Date: Wed Sep 26 18:27:43 2012
New Revision: 833094

Log:
Staging update by buildbot for xmlgraphics

Modified:
    websites/staging/xmlgraphics/trunk/content/   (props changed)
    websites/staging/xmlgraphics/trunk/content/fop/trunk/accessibility.html

Propchange: websites/staging/xmlgraphics/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Sep 26 18:27:43 2012
@@ -1 +1 @@
-1390593
+1390639

Modified: websites/staging/xmlgraphics/trunk/content/fop/trunk/accessibility.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/trunk/accessibility.html (original)
+++ websites/staging/xmlgraphics/trunk/content/fop/trunk/accessibility.html Wed Sep 26 18:27:43 2012
@@ -387,6 +387,126 @@ The processing of the logical structure 
 </pre></div>
 
 
+<h1 id="scope-of-header-table-cells">Scope of Header Table Cells</h1>
+<p>In XSL-FO, tables are inherently defined row by row. The <code>fo:table-header</code> element can be used to define ‘header rows’, in which each cell is a header of the corresponding column (in HTML, the <code>TH</code> element would be used for that).</p>
+<p>There is no way, however, to define ‘row headers’: cells that are headers of the corresponding row. Of course it is possible to style a cell to make it look like a header (for example, by using a bolder font), but that won’t be reflected in the structure of the document.</p>
+<p>When creating accessible document, it is desirable to define the <em>scope</em> of a header cell: whether the header applies to the column, or the row, or both. That information can then be used by a screen reader to better help the user to build a mental representation of the table.</p>
+<p>FOP defines the <code>fox:header</code> extension property for that purpose. If an <code>fo:table-column</code> element has this property set to <code>true</code>, then the corresponding cells will receive the <code>TH</code> structure type, and the <code>Scope</code> structure attribute will have one of the following value:</p>
+<ul>
+<li>‘Both’ if the cell is a descendant of <code>fo:table-header</code>;</li>
+<li>‘Row’ otherwise.</li>
+</ul>
+<table>
+<thead>
+<tr>
+<th><code>fox:header</code></th>
+<th></th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>Value:</td>
+<td>true &#x7C; false</td>
+</tr>
+<tr>
+<td>Initial:</td>
+<td>false</td>
+</tr>
+<tr>
+<td>Inherited:</td>
+<td>no</td>
+</tr>
+<tr>
+<td>Applies to:</td>
+<td><code>fo:table-column</code></td>
+</tr>
+</tbody>
+</table>
+<p>If for some reason a cell inside a header column is not meant to be a header cell, the <code>role</code> property can be used to override the default behavior and set the structure type to <code>TD</code>.</p>
+<p>For example, the following table:</p>
+<div class="codehilite"><pre><span class="nt">&lt;fo:table</span> <span class="na">width=</span><span class="s">&quot;100%&quot;</span> <span class="na">table-layout=</span><span class="s">&quot;fixed&quot;</span><span class="nt">&gt;</span>
+  <span class="nt">&lt;fo:table-column</span> <span class="na">fox:header=</span><span class="s">&quot;true&quot;</span> <span class="na">column-width=</span><span class="s">&quot;proportional-column-width(1)&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;fo:table-column</span> <span class="na">column-width=</span><span class="s">&quot;proportional-column-width(1)&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;fo:table-column</span> <span class="na">column-width=</span><span class="s">&quot;proportional-column-width(1)&quot;</span><span class="nt">/&gt;</span>
+  <span class="nt">&lt;fo:table-header</span> <span class="na">font-weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">&gt;</span>
+    <span class="nt">&lt;fo:table-row&gt;</span>
+      <span class="nt">&lt;fo:table-cell</span> <span class="na">border=</span><span class="s">&quot;1pt solid black&quot;</span> <span class="na">padding-left=</span><span class="s">&quot;1pt&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;fo:block&gt;</span>Header Scope = Both<span class="nt">&lt;/fo:block&gt;</span>
+      <span class="nt">&lt;/fo:table-cell&gt;</span>
+      <span class="nt">&lt;fo:table-cell</span> <span class="na">border=</span><span class="s">&quot;1pt solid black&quot;</span> <span class="na">padding-left=</span><span class="s">&quot;1pt&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;fo:block&gt;</span>Header Scope = Column<span class="nt">&lt;/fo:block&gt;</span>
+      <span class="nt">&lt;/fo:table-cell&gt;</span>
+      <span class="nt">&lt;fo:table-cell</span> <span class="na">border=</span><span class="s">&quot;1pt solid black&quot;</span> <span class="na">padding-left=</span><span class="s">&quot;1pt&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;fo:block&gt;</span>Header Scope = Column<span class="nt">&lt;/fo:block&gt;</span>
+      <span class="nt">&lt;/fo:table-cell&gt;</span>
+    <span class="nt">&lt;/fo:table-row&gt;</span>
+  <span class="nt">&lt;/fo:table-header&gt;</span>
+  <span class="nt">&lt;fo:table-body&gt;</span>
+    <span class="nt">&lt;fo:table-row&gt;</span>
+      <span class="nt">&lt;fo:table-cell</span> <span class="na">border=</span><span class="s">&quot;1pt solid black&quot;</span> <span class="na">padding-left=</span><span class="s">&quot;1pt&quot;</span> <span class="na">font-weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;fo:block&gt;</span>Header Scope = Row<span class="nt">&lt;/fo:block&gt;</span>
+      <span class="nt">&lt;/fo:table-cell&gt;</span>
+      <span class="nt">&lt;fo:table-cell</span> <span class="na">border=</span><span class="s">&quot;1pt solid black&quot;</span> <span class="na">padding-left=</span><span class="s">&quot;1pt&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;fo:block&gt;</span>Cell 1.1<span class="nt">&lt;/fo:block&gt;</span>
+      <span class="nt">&lt;/fo:table-cell&gt;</span>
+      <span class="nt">&lt;fo:table-cell</span> <span class="na">border=</span><span class="s">&quot;1pt solid black&quot;</span> <span class="na">padding-left=</span><span class="s">&quot;1pt&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;fo:block&gt;</span>Cell 1.2<span class="nt">&lt;/fo:block&gt;</span>
+      <span class="nt">&lt;/fo:table-cell&gt;</span>
+    <span class="nt">&lt;/fo:table-row&gt;</span>
+    <span class="nt">&lt;fo:table-row&gt;</span>
+      <span class="nt">&lt;fo:table-cell</span> <span class="na">border=</span><span class="s">&quot;1pt solid black&quot;</span> <span class="na">padding-left=</span><span class="s">&quot;1pt&quot;</span> <span class="na">font-weight=</span><span class="s">&quot;bold&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;fo:block&gt;</span>Header Scope = Row<span class="nt">&lt;/fo:block&gt;</span>
+      <span class="nt">&lt;/fo:table-cell&gt;</span>
+      <span class="nt">&lt;fo:table-cell</span> <span class="na">border=</span><span class="s">&quot;1pt solid black&quot;</span> <span class="na">padding-left=</span><span class="s">&quot;1pt&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;fo:block&gt;</span>Cell 2.1<span class="nt">&lt;/fo:block&gt;</span>
+      <span class="nt">&lt;/fo:table-cell&gt;</span>
+      <span class="nt">&lt;fo:table-cell</span> <span class="na">border=</span><span class="s">&quot;1pt solid black&quot;</span> <span class="na">padding-left=</span><span class="s">&quot;1pt&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;fo:block&gt;</span>Cell 2.2<span class="nt">&lt;/fo:block&gt;</span>
+      <span class="nt">&lt;/fo:table-cell&gt;</span>
+    <span class="nt">&lt;/fo:table-row&gt;</span>
+    <span class="nt">&lt;fo:table-row&gt;</span>
+      <span class="nt">&lt;fo:table-cell</span> <span class="na">border=</span><span class="s">&quot;1pt solid black&quot;</span> <span class="na">padding-left=</span><span class="s">&quot;1pt&quot;</span> <span class="na">role=</span><span class="s">&quot;TD&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;fo:block&gt;</span>Non-header<span class="nt">&lt;/fo:block&gt;</span>
+      <span class="nt">&lt;/fo:table-cell&gt;</span>
+      <span class="nt">&lt;fo:table-cell</span> <span class="na">border=</span><span class="s">&quot;1pt solid black&quot;</span> <span class="na">padding-left=</span><span class="s">&quot;1pt&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;fo:block&gt;</span>Cell 3.1<span class="nt">&lt;/fo:block&gt;</span>
+      <span class="nt">&lt;/fo:table-cell&gt;</span>
+      <span class="nt">&lt;fo:table-cell</span> <span class="na">border=</span><span class="s">&quot;1pt solid black&quot;</span> <span class="na">padding-left=</span><span class="s">&quot;1pt&quot;</span><span class="nt">&gt;</span>
+        <span class="nt">&lt;fo:block&gt;</span>Cell 3.2<span class="nt">&lt;/fo:block&gt;</span>
+      <span class="nt">&lt;/fo:table-cell&gt;</span>
+    <span class="nt">&lt;/fo:table-row&gt;</span>
+  <span class="nt">&lt;/fo:table-body&gt;</span>
+<span class="nt">&lt;/fo:table&gt;</span>
+</pre></div>
+
+
+<p>will be rendered into this:</p>
+<table>
+<thead>
+<tr>
+<th>Header Scope = Both</th>
+<th>Header Scope = Column</th>
+<th>Header Scope = Column</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><strong>Header Scope = Row</strong></td>
+<td>Cell 1.1</td>
+<td>Cell 1.2</td>
+</tr>
+<tr>
+<td><strong>Header Scope = Row</strong></td>
+<td>Cell 2.1</td>
+<td>Cell 2.2</td>
+</tr>
+<tr>
+<td>Non-header</td>
+<td>Cell 2.1</td>
+<td>Cell 2.2</td>
+</tr>
+</tbody>
+</table>
 <h1 id="testing">Testing</h1>
 <p>Accessible PDFs can be tested, for example, using Adobe Acrobat Professional. Its Accessibility Check feature creates a report indicating any deficiencies with a PDF document. Alternatively, you can just let a screen reader read the document aloud.</p>
 <h1 id="limitations">Limitations</h1>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org