rehype-footnotes-title
v2.0.1
Published
This plugin adds a `title` attribute to the footnote links, mainly for accessibility purpose.
Downloads
86
Readme
This plugin adds a title
attribute to the footnote links, mainly for accessibility purpose.
<div class="footnotes">
<hr>
<ol>
<li id="fn-1">
<p>Some clever joke</p>
- <a href="#fnref-1" class="footnote-backref">↩</a>
+ <a href="#fnref-1" class="footnote-backref" title="Jump to reference">↩</a>
</li>
</ol>
</div>
Usage:
.use(footnotesTitles, 'Jump to reference')
.use(footnotesTitles, 'Going back to footnote with id $id')
- If
$id
is found in the string, it gets replaced with the footnote identifier.