nlbdev / nordic-accessible-epub-guidelines

2 stars 2 forks source link

Continuation headings #34

Closed AndersEkl closed 7 months ago

AndersEkl commented 1 year ago

Originally written by @josteinaj

From: https://github.com/nlbdev/nlbpub/issues/11

It can occur that text content at one sectioning depth, for instance level four, are ended ("closed") and that the following text content thematically belong to sectioning depth three. The following markup is an example of this:

<section>
    <h3>Gnagere</h3>
    <p>Man kan sikkert si mye rart om gnagere</p>
    <p>I størrelse varierer disse dyra fra knappe 5 gram (afrikansk pygmemus og dvergmus) til nærmere 80 kg (flodsvin).</p>
    <section>
        <h4>Flodsvin</h4>
        <p>Flodsvinet er mellom 1 og 1,3 meter langt, og veier 35-66 kg. Det har delvis svømmehud mellom tærne. Neseborene, øynene og ørene sitter høyt oppå hodet slik at flodsvinet kan lukte, se og høre mens det svømmer.</p>
    </section>
    <p>Slike dyr forekommer i Norge i stor grad, og … </p>
</section>

A listener will probably assume that the last paragraph in this example (“Slike dyr forekommer i Norge …”) belong to the theme/heading "Flodsvin", and not that it is about "Gnagere" in general.

This can be solved by adding continuation headlines on the form “Fortsettelse på tekst knyttet til overskriften [...]” - so in this case “Fortsettelse på tekst knyttet til overskriften ‘Gnagere’” - or something else appropriate.

This is not something that occurs frequently, but when it occurs, a consequence can be that the listener interprets the information completely wrong.

We could possibly describe such cases, and what to do about it, in the guidelines. The guidelines could instruct producers to add continuation headlines, probably with a special role, or a special class if there's no appropriate role. Or ordering agencies could add this automatically in their own production systems. A third alternative is to make it optional, but then we still have to define how to do it, and add rules for it in the validator.

These headlines should probably also be referenced from the navigation document, so that the reader can navigate to them. Normally we link to the surrounding section element from the navigation document, but as continuation headlines won't be wrapped in a sectioning element, we'll have to consider where to place the id attribute. Agencies might want to visually hide the continuation headlines, while still making them navigable, in which case the id attribute cannot be placed on the heading element itself.

One option is to create a div with no content as an anchor right before the headline:

    <div class="headline-anchor" id="…"></div>
    <h3 class="continuation-headline">Fortsettelse på tekst knyttet til overskriften ‘Gnagere’</h3>
    <p>Slike dyr forekommer i Norge i stor grad, og … </p>

Another other option is to wrap the content in a section element, without increasing the heading depth:

    <section id="…">
        <h3 class="continuation-headline">Fortsettelse på tekst knyttet til overskriften ‘Gnagere’</h3>
        <p>Slike dyr forekommer i Norge i stor grad, og … </p>
    </section>

A third option is to wrap the content in a div element, which might be related to https://github.com/nlbdev/epub3-guidelines-update/issues/46:

    <div id="…">
        <h3 class="continuation-headline">Fortsettelse på tekst knyttet til overskriften ‘Gnagere’</h3>
        <p>Slike dyr forekommer i Norge i stor grad, og … </p>
    </div>
AndersEkl commented 1 year ago

A conundrum here is that we require all proper headings to be included in the navigation document.

martinpub commented 1 year ago

Perhaps it should be clarified that this content is added in the accessibility adaption? To separate this from the original heading structure? Production note?

AndersEkl commented 7 months ago

Since we have added the possibility to mark up something as <h[x] class="no-toc">, maybe this can be used here?

AndersEkl commented 7 months ago

I have written a sub-section to the headings section about this. Please, have a look.

jonaslil commented 7 months ago

I think this a great addition that should solve the issue.

Just noticed a typo: The exampel above -> The example above. And maybe add a word space at the beginning of the text to added to the continuation heading: "(continued)" > " (continued)".

martinpub commented 7 months ago

I agree, great addition @AndersEkl!

AndersEkl commented 7 months ago

Fixed the typo. I don't think the space is needed. The example shows how it is supposed to be. Closing this issue now.

AndersEkl commented 7 months ago

Closing.