It is interesting to note that the aria-roles were designed for websites with no table of contents, no Landmarks, no navigation aids, so very unlike an epub. So accessibility software can build its own navigation interface by parsing the aria-roles attached to sections, and div tags.
From what I can tell, very very few epub3's actually make use of the section tag as the file itself is typically a base unit of navigation with ids inside the file as destinations for links within and outside it.
If you read the epub type and aria roles documentation they want a typical accessible epub3 chapter file to be structured much like the following (if it has a single section):
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title></title>
</head>
<body>
<section epub:type="chapter" role="doc-chapter" aria-labelledby="loc-h1">
<h1 id="loc-h1">Chapter 1: The Title for the Chapter</h1>
<p></p>
...
</section>
</body>
</html>
But I do not think I have ever seen that in an actual epub in the wild. And for what it is worth those section tags did not exist back in the epub2 era so I am not sure if that set of tags would be properly parsed by older epub2 e-readers. That said I did find this under xhtml and aria that might work with epub2 but that would need to be validated:
Code:
<!-- For example, if you are using XHTML 1.1 directly, use the public
identifier in the DOCTYPE declaration, with the namespace declaration
on the document element to identify the default namespace: -->
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+ARIA 1.0//EN"
"http://www.w3.org/MarkUp/DTD/xhtml-aria-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en">
...
</html>
Update: Tried variations of the above but epubcheck rejected it and rejected the section tag as well. So using aria roles and section tags means no backwards compatibility from epub3 to epub2.
Col: 57: ERROR(HTM-004): Irregular DOCTYPE: found "-//W3C//DTD XHTML+ARIA 1.0//EN", expected "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">".
Does anyone create or see epub3 structures with section tags like this? It would make backwards compatible epub3s with epub2 more difficult if not impossible. In a website with no OPF and no nav TOC and Landmarks that every epub generates, some tag would be needed to create an outline toc from (and they do not seem to use the h1-h6 tags for that).
Is this something Sigil should be supporting. Maybe by user preference to make an empty epub3 file structure with the section tags with build in h1-h6 tags with a aria-labelledby linking them?
Of course anyone could create this structure on their own but it appears that the section tag is heavily used/needed for many digital publishing aria roles.
Thoughts?