w3c/dpub-aria

Can we have doc-glossary on <aside>?

Opened this issue · 4 comments

Hi everyone,

as the title suggests, I'm here because I'd need to use role="doc-glossary" on the <aside> tag. However, both EPUBCheck and ACE report errors. ACE reports that "ARIA role doc-glossary is not allowed for given element". As far as I understand, <aside> has the implicit role "complementary", which is a subclass role of "landmark", which in turn is the superclass indicated for doc-glossary.

Also, looking at the Accessible Publishing Knowledge Base by DAISY, <aside> is listed among the possible elements doc-glossary is allowed on (http://kb.daisy.org/publishing/docs/html/dpub-aria/doc-glossary.html).

As for the content of the <aside>, the error occurs both if we have a definition list (<dl> with <dt> and <dd>, possibly with role="term" on <dt>), or if we have a <p> with <dfn> to identify the term.

In the specific use case, I have an EPUB with boxes (<aside>) that contain definitions of words and therefore represent small glossaries, so using doc-glossary would give more semantics.

Can anyone help me understand the problem?

pkra commented

The relevant spec is html-aria which defines which roles are allowed on HTML elements. For the specifics for the aside element see https://w3c.github.io/html-aria/#el-aside.

There's currently an open issue to review the aside element, see w3c/html-aria#411

This shows one of the problems of publishing structures being both primary and subordinate. The role was modelled on a glossary being a primary section in the back matter. If you put it on an aside for a glossary embedded within a section then it's no longer going to be complementary. That's probably not critical since embedded glossaries usually precede the section content, but there's no real advantage to using aside over section in terms of how it will be exposed to AT.

That said, if an aside not scoped to the body or main is going to be generic, anyway, then it doesn't seem harmful to allow doc-glossary on it.

The KB page is not authoritative, as @pkra has already mentioned. There's a link to ARIA in HTML at the bottom, but I'll go back to those element lists and make it clearer to refer to that doc for the most up-to-date list of elements or in case of conflicts.

pkra commented

FWIW, the PR w3c/html-aria#455 is proposing to allow the role on aside elements.