Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we have doc-glossary on <aside>? #53

Open
chiaradm95 opened this issue Mar 28, 2023 · 4 comments
Open

Can we have doc-glossary on <aside>? #53

chiaradm95 opened this issue Mar 28, 2023 · 4 comments

Comments

@chiaradm95
Copy link

chiaradm95 commented Mar 28, 2023

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
Copy link
Member

pkra commented Mar 28, 2023

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

@chiaradm95
Copy link
Author

chiaradm95 commented Mar 28, 2023 via email

@mattgarrish
Copy link
Member

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
Copy link
Member

pkra commented Mar 29, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants