Skip to main content
The 2024 Developer Survey results are live! See the results

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

8
  • 5
    This is no longer true (and has never worked as originally proposed): html5doctor.com/computer-says-no-to-html5-document-outline
    – aardrian
    Commented Jul 19, 2016 at 20:27
  • 3
    I disagree that it is semantically valid. Semantically, you are saying the dialog is a peer to the page as a whole, when it is not. It is defined within the context of the page. This is not new in HTML 5.1, this reflects how the <h#> elements were designed from day one.
    – aardrian
    Commented Jul 19, 2016 at 23:18
  • 3
    Except, a) OP is not using the <dialog> element, b) having its own outline still does not matter since no browser supports the outline algorithm and it has been noted in HTML5 and HTML5.1 that it should be avoided and c) the W3C link you offer even says "Authors should use headings of the appropriate rank for the section’s nesting level."
    – aardrian
    Commented Jul 20, 2016 at 12:03
  • a) No, role=dialog is not equivalent to <dialog>. Adding a role never makes it equivalent, whether for the browser or assistive technology, it just exposes some of its aspects (which is why you still have to script keyboard support for role=button). b) Semantics are different from structure. <h#> imparts both, <strong> imparts only semantics. Technology support is important for AT, so yeah, we are talking about that. c) You are unclear. Regardless, it is still not semantically correct.
    – aardrian
    Commented Jul 20, 2016 at 13:47
  • Thank you for your comments, and helping me improving my answer.
    – Adam
    Commented Jul 20, 2016 at 14:05