解説
作品の主要概念についての図解、コードリスト、ケーススタディ、問題点など。
例
例1 — 図表の例
<figure role="doc-example" aria-labelledby="ex01-hd">
<figcaption>
<p class="hd" id="ex01-hd">Example 1 — Glucose Molecule</p>
<details>
<summary>Description</summary>
<p>The 6 carbon atoms are ordered …</p>
</details>
</figcaption>
<img src="glucose.jpeg" alt="C6H1206" aria-describedby="glucose-desc"/>
</figure>
例2 — コードの例
<p>The most basic hello world example:</p>
<pre role="doc-example">print "Hello World!";</pre>
<p>can be executed after compiling …</p>
ARIAとの関係
doc-example
は、sectionロールからセマンティクスを継承します(つまり、関連コンテンツのコンテナを表しますが、ランドマークではありません)。
使用方法
doc-example
は通常、figure
要素とpre
要素で使用します。
role属性に認められる値についての簡易リストは、EPUBタイプによるARIAロール製作ガイド(EPUB Type to ARIA Role Authoring Guide)の対応表をご覧ください。正式なリストは、HTMLのARIAについて(ARIA in HTML)を参照してください。