Comment by zeroCalories
12 days ago
Tbh there's nothing really wrong with that. You don't need stuff like article or section if you set the right attributes. Often easier to just use divs to get the structure right, and figure out the meaning later.
12 days ago
Tbh there's nothing really wrong with that. You don't need stuff like article or section if you set the right attributes. Often easier to just use divs to get the structure right, and figure out the meaning later.
And there's 'nothing wrong' with just writing code with variables named 'a1, a2, a3'. But when some poor sod has to dig through your mess to figure out what you had in mind it turns out that having an easier to discern logical structure to your code (or html) makes it better. I've dug through a lot of html. And there's a ton of ugly code smell out there. Layers and layers of "I don't really know what I'm doing but I guess it looks okay and I'll make it make sense later". I'm sure it pays the bills for someone. But it makes me sad.
Well, it does help if you expect sight impaired people with software to find the site useful.
That's why I said setting the right attributes. You can make a fully featured accessible website using only divs.
Exactly this.
I wonder if the people downvoted you realize that HN is basically just a big table and a bunch of div, and they use this very site just fine?
As a user, I don't care.
As a disabled user with a screen reader, I might care.
As a developer tasked with maintaining it after the original dev left, I most certainly would care a great deal.
As a developer you maintain the source templates, not the compiled/generated HTML. The HTML is messy doesn't mean the source templates are so.
Semantic web is basically "please think of the crawlers."
Besides the points raised here, I think it's worth noting that using stuff like the article tag does not necessarily make things easier to maintain. You do indeed get a lower line count, but you're coupling the structure and meaning. Sometimes that's fine, but a11y can be tricky to get right and it's often easier to push it off until you've got something working first.
Except that as a developer you have access to the original source code where things are well structured. It only turns into div soup after the React/Vue code gets compiled down to HTML+CSS+JS that can run on any browser.
And it's nearly impossible to customize any part of the layout with user styles because of that.
It's possible to know that HN is basically a big table, use the site just fine, and still recognise that there are disadvantages to that approach.