no headingless sections - speced/respec GitHub Wiki
Default: true
Warns when a <section> element does not begin with a heading element (<h2>–<h6>).
<!-- BAD: no heading -->
<section id="intro">
<p>Content without a heading.</p>
</section><section id="intro">
<h2>Introduction</h2>
<p>Content with a heading.</p>
</section>var respecConfig = {
lint: { "no-headingless-sections": false },
};- Sections without headings are inaccessible — screen readers and ToC generation depend on headings
- The one exception is the
<body>element itself, which is not required to start with a heading