therealglazou / epub31review

6 stars 0 forks source link

Combine spine and toc in simple cases #2

Open dauwhe opened 7 years ago

dauwhe commented 7 years ago

In many simple books, the spine and the toc would likely be identical lists. Having a mechanism to avoid duplicating these would be useful.

therealglazou commented 7 years ago

A simple mention in spine section saying that if there is no "spine" ID in the document, the "toc" one should be used. Nice suggestion, thanks Dave...

frivoal commented 7 years ago

Defining both the spine and the toc via a nav role=toc in the index.html seems ideal. You can mark individual links in it as disabled if you want them to be in the spine but not the toc.

dauwhe commented 7 years ago

Perhaps role="doc-toc" is the appropriate way to do this, now that the Digital Publishing WAI-ARIA roles document is in CR.

frivoal commented 7 years ago

I am not totally sure I understand why all these have to be prefixed by doc-, but yes we should reuse, not reinvent, so that's what we should go after.

therealglazou commented 7 years ago

The doc- prefix is the DPUB-ARIA prefix for role values

therealglazou commented 7 years ago

The only issue with using role instead of unique IDs is "what happens if you have more than one element matching *[role="doc-toc"] ?

frivoal commented 7 years ago

I think that's actually not a real difference. See https://github.com/therealglazou/epub31review/issues/9#issuecomment-273381763