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

[Bug] Footnotes in HTML are semantically incorrect #77

Open
TimidRobot opened this issue Jun 3, 2024 · 1 comment
Open

[Bug] Footnotes in HTML are semantically incorrect #77

TimidRobot opened this issue Jun 3, 2024 · 1 comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be fixed soon 🏁 status: ready for work Ready for work

Comments

@TimidRobot
Copy link
Member

Description

faq/faq/index.html

Lines 3747 to 3756 in 0bf0734

<h2 id="notes">Notes</h2>
<section id="footnotes" class="footnotes footnotes-end-of-document"
role="doc-endnotes">
<hr />
<ol>
<li id="fn1"><p>Key Publications, Inc.&#xA0;v. Chinatown Today Publishing
Enterprises Inc., 945 F.2d 509 (2d Cir. 1991).<a href="#fnref1"
class="footnote-back" role="doc-backlink">&#x21A9;&#xFE0E;</a></p></li>
</ol>
</section>

#76 (comment):

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 TimidRobot added 🟨 priority: medium Not blocking but should be fixed soon 🏁 status: ready for work Ready for work 🛠 goal: fix Bug fix 💻 aspect: code Concerns the software code in the repository labels Jun 3, 2024
@TimidRobot
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be fixed soon 🏁 status: ready for work Ready for work
Projects
Status: Backlog
Development

No branches or pull requests

1 participant