View Single Post
Old 06-18-2025, 01:10 PM   #54
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,899
Karma: 6120478
Join Date: Nov 2009
Device: many
Hi All, after staring at many examples and looking for commonality, here is the set of Accessibility Code Templates I am thinking of including in Sigil under a new epub3 enabled/disabled Insert menu item:

Code:
PLACEHOLDER_TEXT (These placeholders would be translated)
----------------
CHAPTER_TITLE_HERE
TEXT_OF_FOOTNOTE_HERE
TEXT_OF_ENDNOTE_HERE
HREF_TO_ENDNOTE
HREF_RETURN_FROM_ENDNOTE
LABEL_FOR_SIDEBAR
LABEL_FOR_TIP
_N_ /* number of footnote, endnote, page, etc */

Here are the Aria Code Templates I was thinking about:

Section
-------
<section>
    \1
</section>


Aside
-----
<aside>
    \1
</aside>


Chapter Section
---------------
<section role="doc-chapter" epub:type="chapter" aria-labelledby="heading1">
    <h1 id="heading1">CHAPTER_TITLE_HERE</h1>
    \1
</section


Footnotes Section
-------------------------
<section role="doc-footnotes" epub:type="footnotes">
    \1
</section


Footnote Reference
------------------
<a id="ref_fn_N_" href="#fn_N_" epub:type="noteref" role="doc-noteref">[_N_]</a>


Footnote Backlink
-----------------
<a href="ref_fn_N_" epub:type="backlink" role="doc-backlink">[_N_]</a>


Footnote With BackLink (aside)
------------------------------
<aside id="fn_N_" epub:type="footnote" role="doc-footnote">
    <p>
        <a href="#ref_fn_N_" epub:type="backlink" role="doc-backlink">[_N_]</a>
        TEXT_OF_FOOTNOTE_HERE
    </p> 
</aside>


Footnote With BackLink (div)
-----------------------------
<div id="fn_N_" epub:type="footnote" role="doc-footnote">
    <p>
        <a href="#ref_fn_N_" epub:type="backlink" role="doc-backlink">[_N_]</a>
        TEXT_OF_FOOTNOTE_HERE
    </p> 
</div>


EndNote Reference
------------------
<a id="ref_en_N_" href="HREF_TO_ENDNOTES#en_N_" epub:type="noteref" role="doc-noteref">[_N_]</a>


EndNote BackLink
----------------
<a href="HREF_FOR_RETURN_FROM_ENDNOTE#en_N_" epub:type="backlink" role-"doc-backlink">[_N_]</a>


EndNotes Section
----------------
<section epub:type="endnotes" rol="doc-endnotes">
  <ol>
  </ol>
</section>


Endnote with BackLink (li)
--------------------------
    <li id="en_N_" epub:type="endnote">
        <p>
            <a href="HREF_FOR_RETURN_FROM_ENDNOTE#en_N_" epub:type="backlink" role-"doc-backlink">[_N_]</a>    
            TEXT_OF_ENDNOTE_HERE
       </p>
    </li>
 

Tip
---
<aside role="doc-tip" epub:type="tip" aria-label="LABEL_FOR_TIP">
    \1
<aside>


PageBreak hr
------------
<hr epub:type="pagebreak" role = "doc-pagebreak" />


Page List PageBreak (span)
--------------------------
<span id="page_N_" epub:type="pagebreak" role = "doc-pagebreak" aria-label="Page _N_" />

Any thoughts and feedback before I start coding this all up would be welcome.

None of these templates would be user editable, but of course a user could easily create their own editable clip to use in place of any other these.

Thanks for you thoughts and feedback. Hopefully we are getting closer to the end.

Last edited by KevinH; 06-18-2025 at 01:12 PM.
KevinH is offline   Reply With Quote