Timeline for Is it semantically correct to use <h1> in a dialog?
Current License: CC BY-SA 3.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 9, 2023 at 8:12 | comment | added | Jacob |
aardrian has a point, but even outside of the context of the not-implemented document outline, there are still times when a dialog calls for its own h1 ; E.g. The context might be "the page as a whole", such is the case for GDPR consent dialogs. Point is, Having multiple h1 s is actually valid. Nothing in the specification prohibits it, and sometimes it is indeed semantically valid, other times it is simply personal preference. Multiple h1's remain useful when used right (just not when used exclusively).
|
|
Jun 20, 2020 at 9:12 | history | edited | CommunityBot |
Commonmark migration
|
|
Jul 20, 2016 at 15:21 | comment | added | Adam | @aardrian Yes. I attached too much importance on the word "semantic" (no matter if we disagree on its definition), while you rightly pointed the lack of browser support which is more important than the question itself. | |
Jul 20, 2016 at 14:16 | comment | added | aardrian | Adam, did you delete your other comments or is my browser getting all wonky? If so, my comments look like I am shouting at clouds (which is always appropriate in my case). | |
Jul 20, 2016 at 14:05 | comment | added | Adam | Thank you for your comments, and helping me improving my answer. | |
Jul 20, 2016 at 14:03 | history | edited | Adam | CC BY-SA 3.0 |
added 674 characters in body
|
Jul 20, 2016 at 13:47 | comment | added | aardrian |
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.
|
|
Jul 20, 2016 at 12:03 | comment | added | aardrian |
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."
|
|
Jul 19, 2016 at 23:18 | comment | added | aardrian |
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.
|
|
Jul 19, 2016 at 22:13 | history | edited | Adam | CC BY-SA 3.0 |
added 180 characters in body
|
Jul 19, 2016 at 20:27 | comment | added | aardrian | This is no longer true (and has never worked as originally proposed): html5doctor.com/computer-says-no-to-html5-document-outline | |
Jul 19, 2016 at 7:20 | vote | accept | Dogoku | ||
Sep 10, 2020 at 12:04 | |||||
Jul 19, 2016 at 6:40 | history | answered | Adam | CC BY-SA 3.0 |