creativecommons / faq

Creative Commons FAQ page
https://creativecommons.org/faq/
Other
7 stars 18 forks source link

[Bug] Footnotes in HTML are semantically incorrect #77

Open TimidRobot opened 2 months ago

TimidRobot commented 2 months ago

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...

<footer>
<h2 id="notes">Notes</h2>
notes here
</footer>
</main>

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

TimidRobot commented 2 months ago

The HTML is generated from the markdown using Pandoc: Footnotes.

Unfortunately, I don't currently see any way to accomplish the desired state using Pandoc alone. I doubt we will be able to resolve this issue with the current technology stack/process.