nlbdev / nordic-accessible-epub-guidelines

1 stars 2 forks source link

@class docauthor or author semantics for title page are not mentioned #26

Closed AndersEkl closed 5 months ago

AndersEkl commented 1 year ago

Originally written by @martinpub

"3.3.2 Title Page" mentions title markup but nothing about author markup. Having @class docauthor or any other author semantics could be nice, both for styling and for TTS announcement purposes.

EPUB 3 producers are used to <p epub:type="z3998:author" class="docauthor"> so I suggest that the updated guidelines keep at least the class name (if it's still important to stay away from depending on z3998 terminology).

(I have covered both attribute uses in MTM's updated EPUB 3 CSS.)

AndersEkl commented 1 year ago

It is not that it is important to stay away from the z3998 semantics, but more that it serves no purpose to include it. Assistive technology even ignores the epub-type attribute altogether. But, I agree that we should include a class attribute.

jonaslil commented 9 months ago

I think we need a class for editors too. Editors on the title page is really common in academic books. Sometimes title pages include both an author and editor(s), so we shouldn't use the same class for both.

Usually title pages also have the publisher's name at the bottom of the page.

A real example with classes I have found useful:

<p class="book-author">Georg Henrik von Wright</p>
<h1 class="book-title">Om Wittgenstein</h1>
<p class="book-subtitle" role="doc-subtitle">Skrifter 1936–2001</p>
<p class="editors">Utgiven av Lassi Jakola och Thomas Wallgren under medverkan av Yrsa Neuman, Niklas Toivakainen och Bernt Österman</p
<p class="publisher">Svenska litteratursällskapet i Finland <br/>Helsingfors 2022</p>

I'm not saying we need to use exactly these class names. The reason I included "book-" in some of them is that for example author names and subtitles can occur at the beginning of chapters. A title and subtitle can occur on a part title page. Another way of distinguishing these cases is using section level attributes in the css selectors. For example, I have found it useful to add class="titlepage" attribute to the titlepage section. (I would avoid using the namespaced epub:type attributes in css.)

@martinpub @oscarlcarlsson

martinpub commented 9 months ago

If we always will treat them the same, perhaps "author" and "editor" can be merged to "contributor"? Cf. dc:contributor. Not sure we need more level of detail. I'm also thinking about production here, what level of detail can be identified simply.

I like your example but I'm not sure we need that level of detail. For styling purposes it would be very nice though.

Btw, why are you avoiding matching on epub:type in CSS @jonaslil? Just curious.

jonaslil commented 9 months ago

Thanks for the comment! On the question about epub:type in CSS selectors:

I remember having problems in some reading apps with this kind of selector. Not all browsers supported it either, as far as I remember. But this was years ago. I did some testing now (the major browsers + desktop reading apps) and it works just fine. So we can disregard that comment and continue using epub:type in CSS selectors when needed. And of course we can use the dpub role as well. This means that the classes for title and subtitle in my example above are actually redundant. 'book-author' could be just author, if we choose to include that.

The reason I have used different classes for author and editors is that they need different styling. The author name is usually much larger - typically the second largest text element on the title page - and it is usually the topmost element, placed before the title, which affects how you write rules for top and bottom spacing. The editor paragraph is styled smaller and it is usually placed after the title.

I like your suggestion about using "contributor" instead of "editor". This would cover translators as well. But for good styling, we need a way of distinguishing the author from these.

It is a valid point that we shouldn't overcomplicate the markup. On the other hand, adding a couple of classes on the title page will hardly affect production economy. They only need to be applied once in the entire book.

Having CSS that works well right off the bat and sufficiently detailed markup instructions can also be a timesaver. If things look wrong people can start doing ad hoc fixes in the markup and styles for individual books, which is inefficient. Adding a missing class that has been defined in advance is much faster.

And finally, styling is not just a matter of making things look good. It is a means of expressing the structure of the book and the meaning of elements for those who read with their sight. This is expressed quite well in this draft document about EPUB Fixed Layout Accessibility: Visual styling

This might interest @oscarlcarlsson who participates in the accessible css project.

martinpub commented 9 months ago

Thanks for elaborating @jonaslil!

I totally agree with you regarding accessibility aspects of styling, and probably worth it to add some extra work on the title page, good point. My thinking is that at least for MTM, we have not had that level of detail in styling before, neither in guidelines or performed ad-hoc on specific titles. I'm just thinking what else would need further specification in order to style more neatly/accessibly.

Looking forward also to @AndersEkl's and @oscarlcarlsson's comments.

jonaslil commented 9 months ago

Thanks, nice to hear that we a similar view on this. We have a related issue, Styling classes #44 . Maybe that would be a place to elaborate on style related needs that don't fit into the other issues?

josteinaj commented 9 months ago

When cataloging books, there's a difference between a "main entry" ("hovedinnførsel" in norwegian) and "added entry" ("biinnførsel" in norwegian). There could for instance be 8 authors and 1 editor, in which case the editor would probably be cataloged as the main entry, while all the authors would be cataloged as added entries.

So to be more generic, maybe "author" shouldn't be the special case, but "main-entry", "main-contributor", "contributor-main", "contributor main-entry", or similar?

In cataloging there's also a "responsibility statement", which is a free text string extracted from the book. Typically on the form "[author]", "[author 1] and [author 2]", "[author] ; translated by [translator]", "[author] ; illustrated by [illustrator] , translated by [translator]". These strings looks like they can be generated automatically, but they cannot. They are extracted from the book. It is similar to @jonaslil s example for <p class="editors">, so I thought I'd mention it. These could potentially also be marked up with a special class.

jonaslil commented 9 months ago

Interesting points, @josteinaj ! I know too little about the concepts used in cataloguing. One thing that comes to my mind, however, is that if we have 8 authors and one editor the authors would usually wouldn't be listed on the title page - their names would be at the beginning of chapters. Which reminds me that we need to handle author names in that context. And although the editor might be catalogued as the main entry in such a case, the differences I mentioned above in how authors and editors are typically placed and styled on title pages still apply.