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

There was no proper example of the HTML used for the Nesting example, instead it looked like someone was trying to explain it outside of an example like in the other sections of the web page. #32758

Open
ScottSorgent opened this issue Mar 20, 2024 · 1 comment
Assignees
Labels
accepting PR Feel free to open a PR to resolve this issue Content:HTML Hypertext Markup Language docs

Comments

@ScottSorgent
Copy link

MDN URL

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements

What specific section or headline is this issue about?

Nesting

What information was incorrect, unhelpful, or incomplete?

tags were generalized as h's in the general text and not explained how the nesting was done with html. Also, no html was properly done on the first section when identing headers and the tags. It's not that easy, so the correct example should be given or added to not confuse the reader or learner.

What did you expect to see?

Proper html for the examples.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No

MDN metadata

Page report details
@ScottSorgent ScottSorgent added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Mar 20, 2024
@github-actions github-actions bot added the Content:HTML Hypertext Markup Language docs label Mar 20, 2024
@bsmth
Copy link
Member

bsmth commented Mar 20, 2024

Thanks for raising this one. That's a good point, I think the section is to trying to illustrate that the headings should reflect the content structure and organization. We should add a HTML equivalent before the list items.

The important bit looks like the part that mentions "Most screen readers can also generate an ordered list of all the headings on a page" but it would be nice to see the HTML headings. Maybe something like this is better:

Given the following page structure:

<h1>Beetles</h1>
<h2>Etymology</h2>
<h2>Distribution and Diversity</h2>
<h2>Evolution</h2>
<h3>Late Paleozoic</h3>
<!-- etc. -->

Screen readers would generate an ordered list like this:

  1. h1 Beetles

    1. h2 Etymology

    2. h2 Distribution and Diversity

    3. h2 Evolution

      1. h3 Late Paleozoic

As a side note, I'm not sure about "nesting" as I don't think this is recommended (I believe it fails HTML validation):

<h1>Beetles
  <h2>Etymology</h2>
</h1>
@bsmth bsmth self-assigned this Apr 3, 2024
@bsmth bsmth added accepting PR Feel free to open a PR to resolve this issue and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting PR Feel free to open a PR to resolve this issue Content:HTML Hypertext Markup Language docs
2 participants