daisy / ace

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

Allow accessible name of page break markers to come from content? #355

Open rdeltour opened 3 years ago

rdeltour commented 3 years ago

@clapierre noted in #71 about requiring title or aria-label on page break markers:

I think this may be too strict? If the author exposes the Page numbers to everyone, there would be no need to require an aria-label as well.

IE: The following should be valid, but currently causes an ACE Serious Issue.

<span epub:type=“pagebreak” role=“doc-pagebreak” id=“page_1”>Page 1</span>
rdeltour commented 3 years ago

I think this may be too strict? If the author exposes the Page numbers to everyone, there would be no need to require an aria-label as well.

Content-provided accessible name is only introduced in DPUB ARIA 1.1. In 1.0, the accessible name could only come from author (i.e. explicit attributes like aria-label). Ace is not be up-to-date with the latest DPUB ARA 1.1 draft.

I'm not sure what's the state of the implementations or how they compute the name. doc-pagebreak inherits from the separator, which itself only allows name from author.

Note also that the KB currently says:

Note that the aria-label is currently required even when the number is visible. A future version of the DPUB-ARIA module is expected to fix this so that the page number is automatically obtained from the content of the element when a label is not specified

And the Accessibility Techniques 1.0 say:

Do not include the page number as text content, as this practice forces the user to hear it announced wherever it occurs (e.g., without any context in the middle of a sentence).

Testing would be welcome to know how Ace should practically report that.

danielweck commented 2 years ago

I added unit tests to check this (unchanged behaviour, to be discussed ...): https://github.com/daisy/ace/commit/b5d1b66b7008e0ad94a91341e6f5ac8d793b0e85

danielweck commented 1 year ago

In the Thorium reading system project, there is a discussion about implementing an advanced feature that would "force" the display of normally-hidden page breaks (e.g. via authored CSS, so that they don't visually interfere when inlined or rendered as block inside HTML documents), or page breaks with no explicit text content (i.e. just accessible ARIA label or title attribute). This is a feature request from screen reader users who struggle to find their place in the document, relative to page breaks (aka page numbers). I find this interesting as screen readers are supposed to report ARIA-labelled page breaks, even if there is no visual explicit text. https://github.com/edrlab/thorium-reader/discussions/1799