|
@@ -1678,7 +1678,9 @@ toc = false
|
|
|
</svg>
|
|
|
Code blocks
|
|
|
</h1>
|
|
|
- <p>Markdown already supports code samples both inline (using single backticks like `some code here`) and in blocks. <strong>Infusion</strong> will syntax highlight HTML, CSS, and JavaScript if you provide the correct language in the formulation of the block.</p>
|
|
|
+
|
|
|
+
|
|
|
+<p>Markdown already supports code samples both inline (using single backticks like `some code here`) and in blocks. <strong>Infusion</strong> will syntax highlight HTML, CSS, and JavaScript if you provide the correct language in the formulation of the block.</p>
|
|
|
|
|
|
<p>So, this…</p>
|
|
|
|
|
@@ -1707,6 +1709,74 @@ toc = false
|
|
|
</aside>
|
|
|
|
|
|
|
|
|
+<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>
|
|
|
+<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">
|