rehype-footnotes-title

2.0.1 • Public • Published

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.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i rehype-footnotes-title

    Weekly Downloads

    40

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    5.69 kB

    Total Files

    5

    Last publish

    Collaborators

    • situphen
    • talone