b1mind
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
Would make more sense imo
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
Why not change the first section (hero) to a <header> of <main>
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
but again all that is based on context which OP didn't really give. This is what I would do vs two sections #depends with content that needed to be side by side.
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
So like I'll use main header for a hero maybe with some cta's 🤷♂️ but yea this is what I aim for most the time, no hard absolutes or cares though, just an example.
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
footers a funny word
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
so like
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
Even though they don't thats still how I write it semantically lol
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
Which I wish SR's would just see if first child was a hgroup/heading/h2 and use the heading inside to label 🥲
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
This comes into play when you start adding aria-labeledby too.
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
Step ladder down
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
I guess I always think of headings just like indenting too though which is not really a thing you "have" to do.
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
Yea thats why I pointed out I wouldn't probably ever have sections as children of a body
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
Now styling it different sure h1 does not have to be bigger than a h2 visually it can be the smaller size long as it semantically purposeful
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
yea fair I don't see hiding a h1 visually as a thing I would do, not saying I wouldn't but xD
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
then each article would be h2's
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
If I had a page of articles I would still use <main> with a h1 of like "Articles"
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
i.e. Lots of titles will still include the website name appended or before the actual page title.
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
I would think of making a better h1 vs matching it to title before hiding it but 🤷♂️
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
It really does not have to match though
40 replies
KPCKevin Powell - Community
•Created by Mehrab on 3/28/2025 in #front-end
Heading tags in different parent elements?
Really depends on the content though and how its related to the flow
40 replies