In my world, .h2 .heading-2, or anything else describing a scale of type is doing exactly what you are talking about. .h2 !== <h2>. I'm not applying the semantics of one element to another, I'm describing one element as having the 2nd largest size a heading can have. Ya dig?
1
That’s a self conflicting answer. If the item can semantically be described as the second most important hierarchical header on the page, it belongs in an <h2> tag, ya dig?
2
Hierarchical size order and semantic order aren't always tied together. Size !== semantic importance.
2
1
6
Ok, I can appreciate that you weren’t trying to dismiss. Still, hierarchical size, when it’s separate from semantic order, describes presentation not content, and hence doesn’t belong in HTML. Code HTML for a screenreader. <h1 class=“h2”> doesn’t make semantic sense.
2
1
I would argue the exact opposite. It's much better for the screen readers <h1> says that this is the most important semantic element on the page. .h2 says it should be the size of "heading level 2".
2
2
Size shouldn’t be in HTML. What does size mean to a screen reader, when you’re saying it conflicts with the actual proper semantic order?
2
1
Web these days...maybe I’m too old school. CSSZengarden, WASP, ALA, etc. my heroes were/are @mholzschlag @meyerweb @mezzoblue to me, <h1 class=“h2”> is just wrong 🤷🏻‍♂️
1
2
I'm not sure if you think I'm some young gun or something, but this is the same way people have been defining type scales since CSS Zen Garden. h1 is semantically the highest level of heading. `.h2` has no semantic meaning and is defining the 2nd largest heading size
2
2
"no semantic meaning" - I'm not raising a conflict here at all, forgive me, but semantics means meaning and h2 has meaning in hierarchical headings both for structure and also #a11y. Please no conflict on my thread, I make enough on my own ;-)
1
1
Heya, I'm sorry I'm not bringing you into this, I did not mention you. I'm saying that <h2> has semantic meaning but a class name does not specially.
2
1
No worries Scott. It just sidetracked my current thoughts. h2 has meaning. Classes are best when meaningful without crossing a line into presentational. There we go. My work here is done!

Jan 8, 2021 · 9:26 PM UTC

2