Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the ToC sufficient to provide reading order? #36

Closed
BigBlueHat opened this issue Aug 17, 2017 · 19 comments
Closed

Is the ToC sufficient to provide reading order? #36

BigBlueHat opened this issue Aug 17, 2017 · 19 comments

Comments

@BigBlueHat
Copy link
Member

Relates to both #26 "Should the manifest be an implicit TOC?" and the more recent #35 "Proposal: an HTML-first Table of Contents approach to Web Publication."

@HadrienGardeur
Copy link

I'll re-post what I already said in #35.

A TOC is not sufficient to provide a reading order because it's a completely different concept.

A TOC can:

  • only point to some, not all primary resources (for example it might skip preliminary resources such as a copyright page, or a resource containing a single quote)
  • point to the same resource multiple times (for example using fragments to specific locations in a resource)
  • point to resources in an order that's not the reading order (for example a travel guide could contain alternate ways of browsing the publication based on location or a specific interest)

A reading order would:

  • reference all primary resources, and reference them once
  • strictly follow the reading order, and not provide other methods for navigating in a publication

@baldurbjarnason
Copy link
Contributor

baldurbjarnason commented Aug 17, 2017

My problem with this issue as well as with the proposal in issue #35 is that it sacrifices the specificity and clarity of the manifest as a format to aid in the authorship of a very specific kind of publication.

The manifest, once it exists as a concrete structure in an application, absolutely needs reading order, table of contents, and secondary resources as separate structures. If the format we create does not specify these structures as separate pieces of data, we are going to have issues with both interoperability and with our support for diverse publication forms and genres.

So the manifest format absolutely does need to specify these as separate structures in the format from the start. This is something that the html-first proposal does not do and is the root cause for why it is problematic in general (IMO).

Now, I do think that if the reading order is absent, the UA should use the ToC to generate it, and if the ToC is absent, the UA should use the reading order to generate that. And if a list of secondary resources is missing, a UA may want to try to generate that list through some other means. I think these are important features we should at least try to support to help authors do their job.

But we need to start off by specifying a format that supports these as independent structures before we specify how you'd use one type of structure to generate another. And we should be explicit in the specification that these conversions can fail for a variety of reasons.

@iherman
Copy link
Member

iherman commented Aug 17, 2017

First of of all, the very fact that this question comes to the fore means that, in the current list of items in the abstact manifest, the TOC is missing. It is conceptually different from the other items, and we should add it. @mattgarrish?

The question is, in fact, not whether TOC is always a possible replacement of the reading order: I think there enough evidence to say that this is not true (see the examples of @HadrienGardeur). The question is, rather, whether the TOC may be used as an implicit reading order in some cases. I think that this is also the case in very simple publications. In other words I wonder whether we are not having yet another example of the fallback procedures that we had elsewhere already.

I believe we could concentrate first on how to express the various abstract manifest items. Once we have that, we MUST detail what a UA agent should do if one of the required items are missing. That will lead to possible fallback procedures, at least in some cases. The current issue may point at one of those.

@BigBlueHat
Copy link
Member Author

Here's an example of an existing publication-on-the-web that puts the ToC document as the entry point to the book: http://guide.couchdb.org/editions/1/en/index.html

What you'll see on the screen (Part 1-4, then Forward, Preface, etc) is not the order that's shown in the markup. What appears in the markup is actually the "reading order" from the print book--Forward being first as one might expect.

In this case, the display of the book (handled by CSS and JS) reorders the "reading order" encoded in the markup. It seems this was done to put primary content "above the fold" and keeping the typical print ephemera (Forward, Preface, Colophon, Appendixes) below all that.

The resulting being that the "default reading order" is still present in the markup, but the visually presented ToC is restructured for someone not "paging" through the text.

Additionally, this particular example also uses rel="next" and rel="previous" on all of its primary resources. Those next/previous links (which are put in the sidebar by the CSS/JS) move the reader through the "default reading order" which is also expressed in the ToC documents markup. Granted, those could have broken rank, but the author chose to keep things consistent.

I'm very interested in any other examples and descriptions-of-use that anyone may have or be willing to document. Thanks!

@rdeltour
Copy link
Member

In this case, the display of the book (handled by CSS and JS) reorders the "reading order" encoded in the markup.

Just chiming in to note that this can potentially cause violation of WCAG SC 1.3.2 "Meaningful sequence" (level A), as documented in failure F1 "changing the meaning of content by positioning information with CSS".

@HadrienGardeur
Copy link

@iherman

The question is, rather, whether the TOC may be used as an implicit reading order in some cases. I think that this is also the case in very simple publications.

I don't believe that the TOC can be a fallback for a list primary resources without requiring a bunch of conditions that wouldn't make sense for the more general case.

But a list of primary resources could be a good fallback for a TOC if it also contains a title/label per resource.

Here's a basic example using a syntax inspired by the Readium Web Publication Manifest:

"primary": [
  {"href": "/cover", "type": "text/html"},
  {"href": "/copyright", "type": "text/html"},
  {"href": "/introduction", "type": "text/html", "title": "Introduction"},
  {"href": "/chapter1", "type": "text/html", "title": "Chapter I"},
  {"href": "/chapter2", "type": "text/html", "title": "Chapter II"},
  {"href": "/acknowledgements", "type": "text/html"}
]

In this example, the publication has 6 different primary resources but the fallback TOC could consist of three entries:

  • Introduction
  • Chapter I
  • Chapter II

This avoids duplication and would work quite well for basic publications. For publications that require a more complex TOC, you could easily use HTML and include it either in primary or secondary:

"primary": [
  {"href": "/index", "type": "text/html", "rel": "contents"}
]

@rdeltour
Copy link
Member

rdeltour commented Aug 17, 2017

In this example, the publication has 6 different primary resources but the fallback TOC could consist of three entries

Putting my WCAG-police hat on again (whether this hat is big, or blue, is left as an exercise for the careful reader), I believe this could fail WCAG SC 2.4.5 "Multiple ways".

It doesn't change @HadrienGardeur’s good point that a basic ToC can be inferred from the list of primary resource, but if we take this road then I would suggest we make it so that we don't facilitate ways to fail this WCAG criteria.

@BigBlueHat
Copy link
Member Author

BigBlueHat commented Aug 17, 2017 via email

@HadrienGardeur
Copy link

In reply to @rdeltour:

Putting my WCAG-police hat on again (whether this hat is big, or blue, is left as an exercise for the careful reader), I believe this could fail WCAG SC 2.4.5 "Multiple ways".

Could you explain why? I've just followed the link associated to your comment, but I'm not sure that I understand this requirement fully.

In reply to @BigBlueHat:

What do you see as the potential "required conditions"?

The most important ones would be:

  • the TOC must reference all primary resources in the publication
  • these resources must be referenced in the reading order of the publication

Frankly it doesn't make sense to have a fallback in HTML with such strong requirements. IMO HTML is only suited as a fallback for a TOC, not for a primary or secondary list of resources.

@iherman
Copy link
Member

iherman commented Aug 18, 2017

@HadrienGardeur, I am fine with what you wrote. I believe the essential point in my comment was:

I believe we could concentrate first on how to express the various abstract manifest items. Once we have that, we MUST detail what a UA agent should do if one of the required items are missing. That will lead to possible fallback procedures, at least in some cases. The current issue may point at one of those.

@rdeltour
Copy link
Member

In reply to @HadrienGardeur about WCAG SC 2.4.5

Could you explain why?

I created issue #39 to discuss the question.

@HadrienGardeur
Copy link

@iherman

Well there's a good reason why my comment also includes an example of what the syntax could look like ;-)

IMO we need both abstrand AND concrete manifest (I hate those terms BTW) before we start talking about fallbacks.

@BigBlueHat
Copy link
Member Author

In this case, the display of the book (handled by CSS and JS) reorders the "reading order" encoded in the markup.

Just chiming in to note that this can potentially cause violation of WCAG SC 1.3.2 "Meaningful sequence" (level A), as documented in failure F1 "changing the meaning of content by positioning information with CSS".

I did some more digging. It looks like the CouchDB book uses JS to create the displayed re-ordered ToC.

I'm curious (@rdeltour with your loverly WCAG hat on 😁) if that would be a violation or not.

The order in the markup sent to the browser is different, but the order that is presented to the user (by whatever means) is identical to what is in the DOM structure in the page.

Would something like that still violate the "Meaningful sequence"?

@rdeltour
Copy link
Member

The order in the markup sent to the browser is different, but the order that is presented to the user (by whatever means) is identical to what is in the DOM structure in the page.

Would something like that still violate the "Meaningful sequence"?

I believe nowadays requiring Javascript is OK with most ATs, so having the same sequence in the DOM and the visual rendering is acceptable.
But take it with a grain of salt… despite the fake hat that I mostly use to posture, I'm not a real WCAG expert :-) (feel free to ask on a11yslackers, where the knowledgeable people are).

@avneeshsingh
Copy link

TOC can provide default reading order if we make it mandatory that TOC includes all primary resources.
But if we leave this decision to author then TOC may not provide default reading order.
So, it depends on definition of TOC.

@HadrienGardeur
Copy link

Since this is relevant here, I'm cross-posting (from #39) a list of things that IMO a TOC should be allowed to do:

  • a TOC can point to primary or secondary resources
  • it can list the same resource more than once
  • it can point to a fragment of a resource instead of the resource itself
  • it can point to resources in whatever order makes sense
  • it can have a hierarchy (vs flat list for primary/secondary)
  • it doesn't have to reference all primary or secondary resources

@TzviyaSiegman TzviyaSiegman added this to the Manifest Serialization milestone Aug 21, 2017
@BigBlueHat
Copy link
Member Author

@HadrienGardeur would a ToC that did not reference all primary resources be a good "Table of Contents"? If a secondary resource is referenced from a Table of Contents, is it still secondary?

Other than those two, I don't see anything on that list preventing a "default reading order" from being deduced from a Table of Contents.

However, I am digging for more examples of publications (digital or not) where these ToC and reading order are so out of sync that the one can't serve to provide the other. Examples welcome! 😄

@mattgarrish
Copy link
Member

mattgarrish commented Aug 22, 2017

would a ToC that did not reference all primary resources be a good "Table of Contents"?

I don't confess to seeing how the two are related. A good table of contents references all the primary sections of the publication, but those are not necessarily related to the division of resources.

Do you ever find a table of contents that references the cover, for example? About the author blurb? List of additional works? There are plenty of examples of ancillary content that publishers often leave out of the table of contents, and do not make for a bad table of contents. But they are in the default reading order.

Also, what about headingless content that has to fall between major sections? (Often decorative, but not always.) It's in the reading order, but how do you shoehorn into a table of contents?

File chunking could pose a problem to a toc model, too. The assumption is it is done logically, and maybe that will be done on the web, but I've heard complaints that at least one vendor requires epub documents be split after a certain number of images, regardless of whether the break makes any sense from a document outline perspective. A table of contents won't handle that sort of arbitrariness.

I can't see overloading concepts helping authoring here. It's worse than discovering EPUB's restriction on the table of contents structure, in my opinion, as now you have to be aware that you don't actually get to create the table of contents you want but one that has to meet another requirement that ensures that a link to every document in the default reading order is present.

@TzviyaSiegman
Copy link
Contributor

This issue is resolved with #51

@iherman
Copy link
Member

iherman commented Aug 29, 2017

See telco discussion on closure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants