content icon indicating copy to clipboard operation
content copied to clipboard

Update section on multiple h1 elements per page

Open robinmetral opened this issue 3 years ago • 2 comments

Summary

Update the section on the Heading Elements page to reflect the recent change to the HTML spec.

In a nutshell, to create a heading outline...

<main>
  <h1>Page title</h1>
  <section>
    <h1>Section title</h1> <!-- 🙅 don't do this -->
    <h2>Section title</h2> <!-- ✅ do this -->
  </section
</main>

Motivation

Make it clear that relying on the outline algorithm isn't only bad practice, it doesn't follow the spec.

Supporting details

Related issues

Related to https://github.com/mdn/content/pull/18530 (caused by the same change to the HTML spec)

Metadata

  • [ ] Adds a new document
  • [ ] Rewrites (or significantly expands) a document
  • [x] Fixes a typo, bug, or other error

robinmetral avatar Jul 20 '22 15:07 robinmetral

Preview URLs

Flaws

URL: /en-US/docs/Web/HTML/Element/Heading_Elements Title: <h1>–<h6>: The HTML Section Heading elements Flaw count: 1

  • macros:
    • wrong xref macro used (consider changing which macro you use)

External URLs

URL: /en-US/docs/Web/HTML/Element/Heading_Elements Title: <h1>–<h6>: The HTML Section Heading elements

(this comment was updated 2022-09-22 05:36:16.996214)

github-actions[bot] avatar Jul 20 '22 15:07 github-actions[bot]

@stevefaulkner could you please give this one a review?

sideshowbarker avatar Jul 27 '22 03:07 sideshowbarker

refs. https://github.com/mdn/mdn-community/discussions/232

debiru avatar Oct 27 '22 02:10 debiru