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

Footnotes: Using a section without heading causes validation errors #256

Closed
danielfdickinson opened this issue Oct 14, 2021 · 3 comments
Closed
Labels
pinned issue should not be closed by stalebot

Comments

@danielfdickinson
Copy link

tag := "section"

causes

| 175 | <section class="footnotes" role="doc-endnotes"> <hr> | Section lacks heading. Consider using “h2”-“h6” elements to add identifying headings to all sections. |

in W3C http://validator.w3.org/unicorn

There does not appear to be a way to configure the tag to use (e.g.) 'div' when using HTML5. I'm probably missing something, but I don't see a way to override this without changing footnote.go source file.

I do note that in the referenced https://michelf.ca/projects/php-markdown/extra/#footnotes that the example output given is

<p>That's some text with a footnote.
   <sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></p>

<div class="footnotes" role="doc-endnotes">
<hr />
<ol>

<li id="fn:1" role="doc-endnote">
<p>And that's the footnote.
   <a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#8617;</a></p>
</li>

</ol>
</div>

which uses a div (but also looks like the XHTML version).

@danielfdickinson danielfdickinson changed the title Using a section without heading causes validation errors Footnotes: Using a section without heading causes validation errors Oct 14, 2021
@stale
Copy link

stale bot commented Nov 16, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 16, 2021
@yuin yuin added pinned issue should not be closed by stalebot and removed stale labels Nov 24, 2021
@danielfdickinson
Copy link
Author

For what it's worth here are some articles on the status of outlines (sections) and headings:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements#multiple_h1_elements_on_one_page points to

Computer says no to the HTML5 outline
A decade + a year of heading backwards

Basically, it's a mess of spec that was never implemented and never updated to reflect implementation.

@kaushalmodi
Copy link

kaushalmodi commented Apr 6, 2022

I can confirm this HTML validation warning using this short example based on Hugo: test page | HTML validator page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned issue should not be closed by stalebot
Projects
None yet
Development

No branches or pull requests

3 participants