Skip to content

Commit

Permalink
Merge pull request #195 from tommilligan/aria-labelledby
Browse files Browse the repository at this point in the history
feat: add aria attributes to block
  • Loading branch information
tommilligan authored Jun 15, 2024
2 parents d0f73ba + 4c40418 commit 41a3b05
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 67 deletions.
56 changes: 37 additions & 19 deletions integration/expected/chapter_1_main.html
Original file line number Diff line number Diff line change
@@ -1,41 +1,49 @@
<h1 id="chapter-1"><a class="header" href="#chapter-1">Chapter 1</a></h1>
<div id="admonition-what-is-this" class="admonition admonish-abstract">
<div id="admonition-what-is-this" class="admonition admonish-abstract" role="note" aria-labelledby="admonition-what-is-this-title">
<div class="admonition-title">
<div id="admonition-what-is-this-title">
<p>What <i>is</i> this?</p>
<p><a class="admonition-anchor-link" href="#admonition-what-is-this"></a></p>
</div>
<a class="admonition-anchor-link" href="#admonition-what-is-this"></a>
</div>
<div>
<p>This book acts as an integration test for <code>mdbook-admonish</code>.</p>
<p>It verifies that <code>mdbook</code> post-processes our generated HTML in the way we expect.</p>
</div>
</div>
<div id="admonition-note" class="admonition admonish-note">
<div id="admonition-note" class="admonition admonish-note" role="note" aria-labelledby="admonition-note-title">
<div class="admonition-title">
<div id="admonition-note-title">
<p>Note</p>
<p><a class="admonition-anchor-link" href="#admonition-note"></a></p>
</div>
<a class="admonition-anchor-link" href="#admonition-note"></a>
</div>
<div>
<p>Simples</p>
</div>
</div>
<div id="admonition-frog" class="admonition admonish-frog">
<div id="admonition-frog" class="admonition admonish-frog" role="note" aria-labelledby="admonition-frog-title">
<div class="admonition-title">
<div id="admonition-frog-title">
<p>Frog</p>
<p><a class="admonition-anchor-link" href="#admonition-frog"></a></p>
</div>
<a class="admonition-anchor-link" href="#admonition-frog"></a>
</div>
<div>
<p>Custom frog directive</p>
</div>
</div>
<div id="admonition-default" class="admonition admonish-warning">
<div id="admonition-default" class="admonition admonish-warning" role="note">
<div>
<p>No title, only body</p>
</div>
</div>
<div id="admonition-error-rendering-admonishment" class="admonition admonish-bug">
<div id="admonition-error-rendering-admonishment" class="admonition admonish-bug" role="note" aria-labelledby="admonition-error-rendering-admonishment-title">
<div class="admonition-title">
<div id="admonition-error-rendering-admonishment-title">
<p>Error rendering admonishment</p>
<p><a class="admonition-anchor-link" href="#admonition-error-rendering-admonishment"></a></p>
</div>
<a class="admonition-anchor-link" href="#admonition-error-rendering-admonishment"></a>
</div>
<div>
<p>Failed with:</p>
Expand All @@ -55,38 +63,46 @@ <h1 id="chapter-1"><a class="header" href="#chapter-1">Chapter 1</a></h1>
</code></pre>
</div>
</div>
<details id="admonition-note-1" class="admonition admonish-note">
<details id="admonition-note-1" class="admonition admonish-note" role="note" aria-labelledby="admonition-note-1-title">
<summary class="admonition-title">
<div id="admonition-note-1-title">
<p>Note</p>
<p><a class="admonition-anchor-link" href="#admonition-note-1"></a></p>
</div>
<a class="admonition-anchor-link" href="#admonition-note-1"></a>
</summary>
<div>
<p>Hidden on load</p>
</div>
</details>
<div id="admonition-warning" class="admonition admonish-warning">
<div id="admonition-warning" class="admonition admonish-warning" role="note" aria-labelledby="admonition-warning-title">
<div class="admonition-title">
<div id="admonition-warning-title">
<p>Warning</p>
<p><a class="admonition-anchor-link" href="#admonition-warning"></a></p>
</div>
<a class="admonition-anchor-link" href="#admonition-warning"></a>
</div>
<div>
<p>This is a commonly shared warning!</p>
</div>
</div>
<div id="admonition-note-2" class="admonition admonish-note">
<div id="admonition-note-2" class="admonition admonish-note" role="note" aria-labelledby="admonition-note-2-title">
<div class="admonition-title">
<div id="admonition-note-2-title">
<p>Note</p>
<p><a class="admonition-anchor-link" href="#admonition-note-2"></a></p>
</div>
<a class="admonition-anchor-link" href="#admonition-note-2"></a>
</div>
<div>
<pre><code class="language-bash">Nested code block
</code></pre>
</div>
</div>
<div id="admonition-note-3" class="admonition admonish-note">
<div id="admonition-note-3" class="admonition admonish-note" role="note" aria-labelledby="admonition-note-3-title">
<div class="admonition-title">
<div id="admonition-note-3-title">
<p>Note</p>
<p><a class="admonition-anchor-link" href="#admonition-note-3"></a></p>
</div>
<a class="admonition-anchor-link" href="#admonition-note-3"></a>
</div>
<div>
<pre><pre class="playground"><code class="language-rust"><span class="boring">#![allow(unused)]
Expand All @@ -110,10 +126,12 @@ <h1 id="chapter-1"><a class="header" href="#chapter-1">Chapter 1</a></h1>
</li>
<li>
<p>Thing two</p>
<div id="admonition-note-4" class="admonition admonish-note">
<div id="admonition-note-4" class="admonition admonish-note" role="note" aria-labelledby="admonition-note-4-title">
<div class="admonition-title">
<div id="admonition-note-4-title">
<p>Note</p>
<p><a class="admonition-anchor-link" href="#admonition-note-4"></a></p>
</div>
<a class="admonition-anchor-link" href="#admonition-note-4"></a>
</div>
<div>
<p>Thing two</p>
Expand Down
Loading

0 comments on commit 41a3b05

Please sign in to comment.