Skip to main content
mazdaspeed
Inspiring
September 19, 2024
Answered

Why is ID adding aria-labels to my Reflowable EPUBs?

  • September 19, 2024
  • 1 reply
  • 1200 views

I'm getting aria-labels tags (such as <div id="page6" role="doc-pagebreak" aria-label="2" epub:type="pagebreak">) added throughout my EPUBs and it seems arbitrary. Although it is easy enough to remove them using Regex, they are screwing with my footnote output on export. Like the following, where the second footnote is as expected, but the first footnote has an aria-label in a <div> tag and it causes the <p> tag to be placed after the footnote number.

 

<aside id="footnote-016" class="_idFootnote" role="doc-footnote" epub:type="footnote">
<div id="page205" role="doc-pagebreak" aria-label="201" epub:type="pagebreak">
<a class="_idFootnoteAnchor" role="doc-backlink" href="File1.xhtml#footnote-016-backlink">
13 </a>
</div>
<p class="FtNtTxt">. Sample text 1.</p>
</aside>
 
<aside id="footnote-015" class="_idFootnote" role="doc-footnote" epub:type="footnote">
<p class="FtNtTxt"><a class="_idFootnoteAnchor" role="doc-backlink" href="File1.xhtml#footnote-015-backlink">14</a>. Sample text 2.</p>
</aside>

 

This just started being an issue. It's been a couple months since I last exported to EPUB. Some books I work on have upwards to 800 footnotes and I need the tagging to be consistent so I can operate on the entire set at once, using Regex. This is a mess.

Correct answer James Gifford—NitroPress

Uncheck "Page Navigation" in the General pane of the EPUB export menu, and see if that ends the problem.

1 reply

James Gifford—NitroPress
Legend
September 19, 2024

Uncheck "Page Navigation" in the General pane of the EPUB export menu, and see if that ends the problem.

mazdaspeed
Inspiring
September 20, 2024

Sure enough. Thanks, James.

James Gifford—NitroPress
Legend
September 20, 2024

I edit the export because I maintain the documents, meaning I will likely make future changes and therefore desire uniformity. Just set in my ways, I guess. It's an hour or two of prevention.


Okay. I'll just make my usual passive argument that I haven't edited an exported EPUB in over a decade and haven't been given any convincing reason it's a necessity; the arguments-for seem to devolve to outdated methods and practices that can be abandoned.

 

I also find no difference in exporting to "end of chapter" or "in a pop-up" — being reader-driven features, both behave exactly the same in my test triad. So the idea that you have to export to an alternate format to preserve a legacy editing process is... well, your choice.

 

EPUB, like PDF and print, is an end format. When it needs to be changed, you update the source and re-export, not get out the Wite-Out and pencil. 🙂