4 ms·
Hard disagree on that personally. But I guess it depends what industry you’re in. Life’s too short is a cop-out especially because it doesn’t take longer to us
by manuelmoreale 2y ago
Hard disagree on that personally. But I guess it depends what industry you’re in.
Life’s too short is a cop-out especially because it doesn’t take longer to use a semantic tag rather than a div.
With “life’s too short” you can justify pretty much everything.
- LegionMammal978 2y agoCost vs. benefit. If the ARIA roles are all in order (which can admittedly be a pretty big "if"), there's no user-facing benefit to semantic HTML over arbitrary HTML with the same style.
- manuelmoreale 2y agoWhat cost? What’s the cost of typing a different tag?
- LegionMammal978 2y agoThe "cost" in many of these front-end frameworks is having to manage HTML tags at all, instead of generating them automatically from some higher-level specification. Also, you have to remember whether any of them might have a different default style in the browser than what you'd get from a regular div/span.
- manuelmoreale 2y agoIs that really a thing? I’m genuinely asking because I have zero experience with this type of setups since I don’t need to use them and prefer to work in other ways.
- LegionMammal978 2y agoThe idea behind frameworks like Flutter and React Native is that you can specify the document as a tree of high-level components, which can then be rendered either as a web page or as a mobile app. In that case, there's simply no equivalent to the semantic HTML tags on the other platforms, so you'd end up with a big impedance mismatch if you tried to force them in there. (Though of course, such tools are definitely targets of OP's derision.)
- manuelmoreale 2y agoI see. Interesting. But what’s the benefit of using a tool like that if you’re only targeting the web as a platform?
- LegionMammal978 2y agoNone, unless you (or your team) is already familiar with it, I'd imagine. I think some (like Flutter) are designed to have similar markup regardless of which or how many platforms a particular project uses. But don't take my word on any specific examples, I don't have any real experience outside of normal web React (which does give you full control over the HTML elements, except of course for third-party components).
- manuelmoreale 2y agoAgain, very interesting. Thank you for the insight. Appreciate it.