Thanks for your question!
The aria-labelledby attribute points to a label—usually a heading—in a section that is considered an important part of the EPUB, which users can quickly navigate to. It is actually helpful to have a unique aria-labelledby for each chapter since each content chapter has the same role (doc-chapter).
It is up to your discretion to identify key components of the EPUB and apply aria-labelledby to those sections. Key components may include text chapters, prologue, part, glossary, appendix, etc. Aria-labelledby can also be used for titled asides or other important secondary sections (that are marked by headings) that may appear multiple times in a publication.
TL;DR, yes, the use of aria-labelledby in your example is correct. However, I would change the epub:type in your example to epub:type=”chapter”, as “bodymatter” is a separate semantic value and does not have an associated ARIA role.
February 2, 2023 at 12:43 pm