Closed AndersEkl closed 7 months ago
Looking at this issue. 2020-1 requires aria-labels for untitled sections and says that these labels should be used in the toc nav in the absence of a heading. The use of aria-labels for untitled sections is in line with the Daisy KB, so I suppose we don't want to change this. The new rule for constructing page titles also relies on the aria-label if no heading is present.
A script that (re-)generates the toc could make use of the aria-labels, and conversion scripts could turn them into regular headings if needed.
This is related to #62, which has been resolved.
Originally written by @josteinaj
The untitled sections needs a title in the navigation document. But I would prefer to not have the title of the untitled sections living only in the navigation document.
An alternative would be to use the
hidden
attirubute on ah1
-h6
element:This would not render the headline visibly or for screen readers. The text would not be searchable. It should not have a
id
attribute, since it is not navigable. The parentsection
element will have a navigableid
that is referenced from the navigation document.This would also make it easy to generate a new navigation document based on the content, which can be useful in automated processes.
See also: https://github.com/nlbdev/epub3-guidelines-update/issues/71
Comment by @martinpub
Great input @josteinaj, didn't think about untitled sections. In 2020-1 we use
aria-label
to enter the name of untitled sections in the content documents, and a rule that it should match with the nav toc. Of course, usingaria-label
will also construct the section as a landmark, in the same way asaria-labelledby
, so this is an issue.For titled subsections that should not be landmarks, maybe we still need an explicit link between the section and the heading element?
For untitled sections, I'm not sure a hidden heading element will be enough for our accessibility production, but an upgrade could very well just turn it into a regular heading, in which way it will be the same technically as regular headings.
Let us return to this issue in the guidelines review work. (I hope to be able to give that some resources soon, but not entirely sure currently.)
Comment by @AndersEkl
The Knowledge base suggests simply using
aria-label
for sections without headings. Using hidden content seems to be discouraged.I am in the process of transferring issues from this repo to the new one. I will transfer this one as well, so that we can conclude the discussion later on.