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

Ancestors of <dfn> unclear #10599

Open
erikkroes opened this issue Sep 5, 2024 · 3 comments
Open

Ancestors of <dfn> unclear #10599

erikkroes opened this issue Sep 5, 2024 · 3 comments
Labels
clarification Standard could be clearer

Comments

@erikkroes
Copy link

erikkroes commented Sep 5, 2024

What is the issue with the HTML Standard?

I'm implementing a <dfn>-element and wanted to read up on how best to do so. In the spec there's the following text:

The dfn element represents the defining instance of a term. The paragraph, description list group, or section that is the nearest ancestor of the dfn element must also contain the definition(s) for the term given by the dfn element.

What made this bit unclear that it mentions <section> but links to https://html.spec.whatwg.org/multipage/dom.html#sectioning-content-2 (and not https://html.spec.whatwg.org/multipage/sections.html#the-section-element, as one might expect from the text).

This leaves me to question:

  • Should (must?) I follow the text, and use an <section> as nearest ancestor, or
  • can is use any kind of sectioning content, as the link implies?

Thanks for clarity on this!

@erikkroes erikkroes changed the title Ancestors of <dfn> Ancestors of <dfn> unclear Sep 5, 2024
@annevk annevk added the clarification Standard could be clearer label Sep 5, 2024
@annevk
Copy link
Member

annevk commented Sep 5, 2024

It's the more general notion of section that includes the aside element. Note that the definition for paragraph is even more complex.

@erikkroes
Copy link
Author

I see some typos in my issue. Being unclear about an unclear spec. Great combo!

So if I understand correctly, I can use any kind of sectioning content? It's including, but not limited to, the actual <section>.
Thanks!

@annevk
Copy link
Member

annevk commented Sep 6, 2024

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer
Development

No branches or pull requests

2 participants