nlbdev / nordic-epub3-dtbook-migrator

Tools for converting between a strict subset of DTBook and EPUB3.
http://nlbdev.github.io/nordic-epub3-dtbook-migrator/
GNU Lesser General Public License v2.1
8 stars 7 forks source link

Bridgehead is not allowed in `<aside>` #460

Closed martinpub closed 3 years ago

martinpub commented 3 years ago

Current rule: [nordic270] Bridgehead is only allowed as a child of section, article and div. (<p epub:type="bridgehead">).

According to the guidelines text, they does not seem to be forbidden in asides:

Headings in text boxes is by default required to be marked up using

. These are structurally unimportant headings and will not be included in the navigation document. If, however, certain text boxes should be included in the navigation document, they must be marked up using a <h[x]> element of an appropriate level, following the level structure of the surrounding text. Only text boxes marked up with

Even though I know ACE complains when we have untitled (as in no aria-labelledby/aria-label) asides, but according to how the guidelines text is currently formulated, I think bridgehead should be allowed in asides, right @AndersEkl?

Ping @kalaspuffar

AndersEkl commented 3 years ago

Yeah, that sounds reasonable to me.

martinpub commented 3 years ago

Hi @kalaspuffar,

It seems that even with your fix, bridgeheads like in the following example is not allowed:

<aside id="aside-test1" class="text-box" lang="en" xml:lang="en">
<p epub:type="bridgehead">Bridgehead heading</p>
<p>Aside text box text content</p>
</aside>

Looking at the RelaxNG file, it seems that bridgehead is an allowed class but not an allowed epub:type. I think it should be the other way around.

Probably an easy fix, if you could have a look?

kalaspuffar commented 3 years ago

Hi @martinpub

Bridgehead is allowed using epub:type, but the example above is not a sidebar. It's a text-box. Sidebars need to have the class="sidebar" to distinguish from other aside elements.

I looked into https://format.mtm.se/nordic_epub/2020-1#sidebars-text-boxes-etc.

Does this mean that class sidebar or text-box should be interpreted as sidebars or is any other classes that will be used here?

Best regards Daniel

Best regards Daniel

martinpub commented 3 years ago

Hi @kalaspuffar. For all purposes, the class "sidebar" was deprecated and replaced by class "text-box" with the 2020-1 guidelines. I hope this clarifies the issue.

Ping @AndersEkl

AndersEkl commented 3 years ago

Previously, the class attribute "sidebar" was present to map elements to the DTBook element <sidebar>. The way <sidebar> was used previously was not semantically correct. It was used for all sorts of purposes, regardless of if the content was part of the main text or not. Semantically, <sidebar> should be only content that is not part of the main text. This function is very similar to the <aside> element in HTML. The class attribute "text-box" is only meant as a styling indicator and can be used for both secondary content, marked up with <aside>, and content that is integral to the main text, marked up with <div>. I don't see any need for the class attribute "sidebar" any more, as the semantic function is carried by which HTML element is used.

Bridgeheads need to be allowed for "text-box" content regardless of what element it is contained in.

I hope that clarifies things.

kalaspuffar commented 3 years ago

Hi @AndersEkl

Not really, but I guess the fix I've created is not what you want. When the change has been clarified I could implement it. If we are in a situation where everything should be allowed again we might need to discuss it in the group at the next meeting.

Best regards Daniel

AndersEkl commented 3 years ago

"Sidebar" is no longer used as a class attribute. Bridgehead should be allowed in <aside> elements in addition to the previously allowed contexts. I don't think it is more complicated than that, really.

martinpub commented 3 years ago

I agree with @AndersEkl. See also my comment in #469. Let me know if you have any remaining questions @kalaspuffar, and we will be happy to discuss further.