{"route":"/en-US-v0.14.1/reference/pdf/table-summary/","title":"Table Summary","description":"Documentation for the `table-summary` function.","part":null,"outline":[{"id":"summary","name":"Summary","children":[]},{"id":"parameters","name":"Parameters","children":[{"id":"parameters-summary","name":"summary","children":[]},{"id":"parameters-table","name":"table","children":[]}]}],"body":{"kind":"func","content":{"path":["pdf"],"name":"table-summary","title":"Table Summary","keywords":[],"oneliner":"A summary of the purpose and structure of a complex table.","element":false,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>A summary of the purpose and structure of a complex table.</p>\n<p>This will be available for Assistive Technology (AT), such as screen\nreaders, when exporting to PDF, but not for sighted readers of your file.</p>\n<p>This field is intended for instructions that help the user navigate the\ntable using AT. It is not an alternative description, so do not duplicate\nthe contents of the table within. Likewise, do not use this for the core\ntakeaway of the table. Instead, include that in the text around the table\nor, even better, in a <a href=\"/en-US-v0.14.1/reference/model/figure/#definitions-caption\">figure caption</a>.</p>\n<p>If in doubt whether your table is complex enough to warrant a summary, err\non the side of not including one. If you are certain that your table is\ncomplex enough, consider whether a sighted user might find it challenging.\nThey might benefit from the instructions you put here, so consider printing\nthem visibly in the document instead.</p>\n<p>The API of this feature is temporary. Hence, calling this function requires\nenabling the <code>a11y-extras</code> feature flag at the moment. Even if this\nfunctionality should be available without a feature flag in the future, the\nsummary will remain exclusive to PDF export.</p>\n<div class=\"previewed-code\"><pre><code><span class=\"typ-func\">#</span><span class=\"typ-func\">figure</span><span class=\"typ-punct\">(</span>\n  pdf<span class=\"typ-punct\">.</span><span class=\"typ-func\">table-summary</span><span class=\"typ-punct\">(</span>\n    <span class=\"typ-comment\">// The summary just provides orientation and structural</span>\n    <span class=\"typ-comment\">// information for AT users.</span>\n    summary<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;The first two columns list the names of each participant. The last column contains cells spanning multiple rows for their assigned group.&quot;</span><span class=\"typ-punct\">,</span>\n    <span class=\"typ-func\">table</span><span class=\"typ-punct\">(</span>\n      columns<span class=\"typ-punct\">:</span> <span class=\"typ-num\">3</span><span class=\"typ-punct\">,</span>\n      table<span class=\"typ-punct\">.</span><span class=\"typ-func\">header</span><span class=\"typ-punct\">[</span>First Name<span class=\"typ-punct\">]</span><span class=\"typ-punct\">[</span>Given Name<span class=\"typ-punct\">]</span><span class=\"typ-punct\">[</span>Group<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n      <span class=\"typ-punct\">[</span>Mike<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>Davis<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> table<span class=\"typ-punct\">.</span><span class=\"typ-func\">cell</span><span class=\"typ-punct\">(</span>rowspan<span class=\"typ-punct\">:</span> <span class=\"typ-num\">3</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>Sales<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n      <span class=\"typ-punct\">[</span>Anna<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>Smith<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n      <span class=\"typ-punct\">[</span>John<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>Johnson<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n      <span class=\"typ-punct\">[</span>Sara<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>Wilkins<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> table<span class=\"typ-punct\">.</span><span class=\"typ-func\">cell</span><span class=\"typ-punct\">(</span>rowspan<span class=\"typ-punct\">:</span> <span class=\"typ-num\">2</span><span class=\"typ-punct\">)</span><span class=\"typ-punct\">[</span>Operations<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n      <span class=\"typ-punct\">[</span>Tom<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span> <span class=\"typ-punct\">[</span>Brown<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n    <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-punct\">)</span><span class=\"typ-punct\">,</span>\n  <span class=\"typ-comment\">// This is the key takeaway of the table, so we put it in the caption.</span>\n  caption<span class=\"typ-punct\">:</span> <span class=\"typ-punct\">[</span>The Sales org now has a new member<span class=\"typ-punct\">]</span><span class=\"typ-punct\">,</span>\n<span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/c201ac9a658ef04d467227539fa50795.png\" alt=\"Preview\"></div></div>"}],"self":false,"params":[{"name":"summary","details":[],"types":["str"],"strings":[],"default":null,"positional":false,"named":true,"required":false,"variadic":false,"settable":false},{"name":"table","details":[{"kind":"html","content":"<p>The table.</p>"}],"types":["content"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false}],"returns":["content"],"scope":[]}}}