daisy / ace

Ace by DAISY, an Accessibility Checker for EPUB
MIT License
74 stars 22 forks source link

ACE throwing an error when epub:type="page-break" is missing #414

Closed clapierre closed 1 month ago

clapierre commented 2 months ago

With the following code snip it.

<span id="piv" class="page" role="doc-pagebreak">Page 23</span> We get the following Error Message from ACE:

Serious | EPUB | epub-pagelist-brokenAce | "undefined"/OEBPS/toc.xhtml | Publication page list must reference page breaks (Porter_Mascaro-0002.xhtml#pi [epub:type="pagebreak"!?])Ensures the page list links to page breaks (Porter_Mascaro-0002.xhtml#pi [epub:type="pagebreak"!?])Make sure that page list items point to epub:type page breaks (Porter_Mascaro-0002.xhtml#pi [epub:type="pagebreak"!?])

From Matt Garish:

We recommend using both epub:type=”pagebreak” and role=”doc-pagebreak” in the accessibility techniques for maximum compatibility with reading systems and AT. That said, I wonder if we did that for a reason or if it was just to cover our bases? I’m not sure any reading systems care about the page break semantic from the structural vocabulary (unlike footnotes), so it seems kind of superfluous.

So my question is epub:type="pagebreak" required and we should recommend always to include both role="doc-pagebreak" and epub:type="pagebreak.

mattgarrish commented 2 months ago

Looking more closely at the error message, it's not exactly what I thought was at issue. I thought this was only about having an aria role without the epub:type on the marker, but it looks like a complaint that the destination of a page list entry is not marked as a page break using epub:type. That's not a requirement of the accessibility specification. You can link to destinations that aren't marked as anything.

An example that was raised of when you might not have page break markers at the destination was adding a minimal page list using chapter headings as the destination (i.e., you only get the pages that the chapters start on). An incomplete page list is only a warning-level violation, however.

The only requirement is that any page breaks markers must be linked to from the page list. In other words, I'm not sure this check is correct or helpful. If kept, it might help to lower the severity to something like a best practice that there's no role on the destination, but not make it a serious error.