|
@@ -1709,21 +1709,74 @@ toc = false
|
|
|
</aside>
|
|
|
|
|
|
|
|
|
-<h2 id="annotated">Annotated</h2>
|
|
|
+<h2 id="annotated-html">Annotated HTML</h2>
|
|
|
|
|
|
+<p>Since the structure of HTML is critical to interoperable web interfaces, <strong>Infusion</strong> offers the ability to highlight and annotate specific HTML elements and attributes using the <code>html</code> shortcode.</p>
|
|
|
|
|
|
+<p>Take an accessible dialog. You may wish to point out key attributes that make that dialog support assistive technologies:</p>
|
|
|
|
|
|
|
|
|
-<div class="html-annotated"><code>
|
|
|
-<ul>
|
|
|
- <li>Here's a thing</li>
|
|
|
- <li <span class='highlight'>role="separator"</span>>Here's a thing</li>
|
|
|
- <li>Here's a <span class='highlight'>thing</span></li>
|
|
|
- <li>Here's a thing <span <span class='highlight'>aria-hidden="true"</span>></span></li>
|
|
|
-</ul>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<div class="html-annotated "><code>
|
|
|
+<div <span class='highlight'>role="dialog"</span> <span class='highlight'>aria-labelledby="dialog-heading"</span>>
|
|
|
+ <button <span class='highlight'>aria-label="close"</span>>x</button>
|
|
|
+ <h2 <span class='highlight'>id="dialog-heading"</span>>Confirmation</h2>
|
|
|
+ <p>Press <strong>Okay</strong> to confirm or <strong>Cancel</strong></p>
|
|
|
+ <button>Okay</button>
|
|
|
+ <button>Cancel</button>
|
|
|
+</div>
|
|
|
</code></div>
|
|
|
|
|
|
|
|
|
+<p>You mark out the highlighted areas with double parentheses like so:</p>
|
|
|
+
|
|
|
+<pre class=""><code data-codeblock-shortcode>
|
|
|
+{{<html>}}
|
|
|
+<div ((role="dialog")) ((aria-labelledby="dialog-heading"))>
|
|
|
+ <button ((aria-label="close"))>x</button>
|
|
|
+ <h2 ((id="dialog-heading"))>Confirmation</h2>
|
|
|
+ <p>Press <strong>Okay</strong> to confirm or <strong>Cancel</strong></p>
|
|
|
+ <button>Okay</button>
|
|
|
+ <button>Cancel</button>
|
|
|
+</div>
|
|
|
+{{</html>}}
|
|
|
+</code></pre>
|
|
|
+
|
|
|
+
|
|
|
+<p>Better still, if you include <code>numbered="true"</code>, each highlight is enumberated so you can reference it directly in the ensuing text.</p>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+<div class="html-annotated numbered"><code>
|
|
|
+<div <span class='highlight'>role="dialog"</span> <span class='highlight'>aria-labelledby="dialog-heading"</span>>
|
|
|
+ <button <span class='highlight'>aria-label="close"</span>>x</button>
|
|
|
+ <h2 <span class='highlight'>id="dialog-heading"</span>>Confirmation</h2>
|
|
|
+ <p>Press <strong>Okay</strong> to confirm or <strong>Cancel</strong></p>
|
|
|
+ <button>Okay</button>
|
|
|
+ <button>Cancel</button>
|
|
|
+</div>
|
|
|
+</code></div>
|
|
|
+
|
|
|
+
|
|
|
+<p>You just include <code>numbered="true"</code> on the opening shortcode tag:</p>
|
|
|
+
|
|
|
+<pre class=""><code data-codeblock-shortcode>
|
|
|
+{{<html numbered="true">}}
|
|
|
+<div ((role="dialog")) ((aria-labelledby="dialog-heading"))>
|
|
|
+ <button ((aria-label="close"))>x</button>
|
|
|
+ <h2 ((id="dialog-heading"))>Confirmation</h2>
|
|
|
+ <p>Press <strong>Okay</strong> to confirm or <strong>Cancel</strong></p>
|
|
|
+ <button>Okay</button>
|
|
|
+ <button>Cancel</button>
|
|
|
+</div>
|
|
|
+{{</html>}}
|
|
|
+</code></pre>
|
|
|
+
|
|
|
+
|
|
|
</div>
|
|
|
|
|
|
<div class="pattern-section">
|