w3c / epub-specs

Shared workspace for EPUB 3 specifications.
Other
305 stars 60 forks source link

Nav doc semantics aren't required by the specification #2623

Closed mattgarrish closed 4 months ago

mattgarrish commented 5 months ago

One of the things you stop seeing after a while, I guess, but despite calling the sections "The toc nav element" and "The page-list nav element", we don't appear to require any specific semantic be used on these nav elements. An epub:type attribute is required, but not a specific value.

The semantics are implied by the sections and the obviousness of the semantic names, of course, but that's not exactly sound spec writing. And the structure vocab mentions their intended uses in the usage details section for each, but that's also not normative.

It would be better if each of the toc, page-list, and, landmarks nav sections required those semantics in their respective epub:type attributes.

(On a side note, there's a typo in the first sentence of the page-list nav section. It says "The page-list element provides ..." but it should be "The page-list nav element provides ")

iherman commented 5 months ago

+1.

Thankfully, the toc, landmarks, and page-list values are defined in the separate note, so it is only a question of an (almost) editorial change in the document. Note that some examples (Nos. 51 or 53) actually use these values already.

mattgarrish commented 5 months ago

so it is only a question of an (almost) editorial change in the document

Ya, the requirements are all essentially implied by the section naming, and the introduction explains the correlation between the epub:type values and what they define, but if you just land at one of the definitions there's nothing there that makes clear what a toc nav is or that we're talking about the epub:type attribute value.

I think maybe all we need is to rewrite the first sentence of each section. For example, instead of:

The toc nav element defines the primary navigational hierarchy.

We be more explicit what we're talking about and link everything up:

A [^nav^] element [[html]] with its [^epub:type^] attribute set to the value toc [[epub-ssv-11]] defines the primary navigational hierarchy.

(Edit: removed redundant "value" from proposal.)

mattgarrish commented 5 months ago

Or maybe it would be clearer to rearrange a bit, too:

The primary navigational hierarchy for the [=EPUB publication=] is defined in a [^nav^] element [[html]] with its [^epub:type^] attribute set to the value toc [[epub-ssv-11]].