DEV Community

Discussion on: Accessibility for the web - why we should use semantic HTML

Collapse
 
deta19 profile image
mihai

okay, i see your point, but you can give meaning by introducing ids and classes, of course you need to use correctly those things, meaning a id is unique on the page, a class can be reused on any page... d'ohh that's theory. So i can only say this.
It's a matter of usage and what the managers/people you work with say. I mean if the standard is to use these html 5 tags... great!! we all use this. Same can be said about using sass /less /etc .
But if communications is bad, and people let you work on your own , then you could go all xhtml on the project.
Side note, backcend dev don't care what html you give them, we/ they will implement it how it is given, they also can call on you to make changes where you didn't compensate, meaning there was a place where the backend puts and not just divs or But, nice article, keep going :)

Collapse
 
sid7 profile image
Suyash

HTML had semantics even before HTML5 new semantic tags via WAI-ARIA Roles attributes and some of these new tags also brought new native capabilities (like accordion with details & summary). Also class or id doesn't change the semantic meaning of the tag, div with id or class of footer will still have generic semantic.

Collapse
 
arikaturika profile image
Arika O • Edited

I understand your point of view. HTML5 is not that new tho' and it has no learning curve (when it comes to semantic elements at least). I don't see why would anyone chose to clutter their HTML with CSS and write something like <div id="footer">This is a footer</div> when they could go the simple and user friendly way and write <footer>This is a footer</footer>. These ids and classes might make sense for us, the developers, but let's not forget that screen readers are not human so most often than not, the CSS doesn't make much sense to them. Everyone working as they wish and poor communication inside a team are some realistic scenarios but this is another problem :). Thx for your input.