creativecommons / creativecommons/faq
[Bug] Footnotes in HTML are semantically incorrect
- Dominant language
- HTML
- Stars
- 8
- Forks
- 19
- PR merge metrics
- No merged PRs in 30d
Description
## Description
https://github.com/creativecommons/faq/blob/0bf0734795cd910c1166b971408a7d5b9b7d744a/faq/index.html#L3747-L3756
https://github.com/creativecommons/faq/pull/76#discussion_r1624726953:
> This isn't semantically correct. The `h2` of "notes" would need to be inside the `section` element, as a `section` generally requires a heading element to denote it.
>
> It could be argued that of the two, the `aside` is actually a more appropriate element, but it too would need the `h2` to be within it as well. An `aside` does not require a heading element within it, but if one appears for it, it must appear within it.
>
> The MOST semantic, and likely correct route, would be for the endnotes to appear (with the associated `h2`) within a `footer` element (instead of a `section` or `aside`). As they are meant to be footnotes for the `main` section, that is the next parent level sectioning element and they would then be semantically associated as the "footer of the main area", which is much more accurate to what the footnotes are in this case.
>
> sooo...
>
> ```html
>
>
Notes
> notes here
>
>
> ```
>
> As `divs` are semantically meaningless whether it appears before or after the closing `div` tag is semantically irrelevant, just whichever one wouldn't throw off the visual styling.
## Expectation
HTML should be semantic and provide best possible support for accessibility aids
Contributor guide
Assessment
This issue has not been assessed yet.