PDF→EPUB: Add ARIA roles to examples.

This commit is contained in:
tastytea 2021-03-21 23:21:54 +01:00
parent b26895aa88
commit 79d3124ebb
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 6 additions and 4 deletions

View File

@ -184,15 +184,17 @@ Once you are done, copy the result into Calibre.
Use the method from above to copy the endnotes into the now empty Emacs buffer
and clean them up until you have 1 paragraph per line. Endnotes need to be
hyperlink-able, so we can't just wrap them in plain `<p>` tags, they need IDs. I
like to use `<span>1</span><aside epub:type="endnote" id="fn1">[…]</aside>` if there
is only one footnote-section or `<span>1</span><aside epub:type="endnote"
like to use `<span>1</span><aside epub:type="endnote" role="doc-endnote"
id="fn1">[…]</aside>` if there is only one footnote-section or
`<span>1</span><aside epub:type="endnote" role="doc-endnote"
id="fn1_1">[…]</aside>` for chapter-endnotes. We are going to use a macro with a
counter to generate consecutively numbered IDs. First, set the counter to 1 with
kbd:[C-x] kbd:[C-k] kbd:[C-c] `1`. Then, record this macro:
`<span>` kbd:[C-x] kbd:[C-k] kbd:[<tab>] kbd:[C-u] `-1` kbd:[C-x] kbd:[C-k]
kbd:[C-a] `</span><aside epub:type="endnote" id="fn` kbd:[C-x] kbd:[C-k]
kbd:[<tab>] `">` kbd:[<end>] `</aside>` kbd:[<down>] kbd:[<down>] kbd:[<home>]
kbd:[C-a] `</span><aside epub:type="endnote" role="doc-endnote" id="fn`
kbd:[C-x] kbd:[C-k] kbd:[<tab>] `">` kbd:[<end>] `</aside>` kbd:[<down>]
kbd:[<down>] kbd:[<home>]
[NOTE]
kbd:[C-u] `-1` kbd:[C-x] kbd:[C-k] kbd:[C-a] “adds” -1 to the counter, so that