3 ms·
I tried to push for an "HTML first" style frontend at my job, but we hired some run-of-the-mill frontend devs and they basically didn't get it and just wanted e
by resonious 3y ago
I tried to push for an "HTML first" style frontend at my job, but we hired some run-of-the-mill frontend devs and they basically didn't get it and just wanted everything to be divs with VueJS controlling all of the logic and content.
One semi-objective thing we lost was accessibility. Much of the site is impossible to navigate via keyboard due to naively re-implemented behavior like links being divs with click event listeners. It's actually somewhat worrying - when regulations hit us, we'll have to scramble hard to get back what we threw out.
But all in all I kind of agree with you that it's very hard to find high profile examples of sites that are "HTML first". I believe in it, but haven't actually seen it pan out. But I suspect the reasons for it not panning out might be purely in education. By the time HTML became powerful, frontend dev education was already deeply framework-focused.
- listenallyall 3y ago> it's very hard to find high profile examples of sites that are "HTML first" Because the tools to create it are relatively new, and the sites you're speaking of had already been written. What high-profile site didn't already have a massive legacy React/Angular/Vue codebase, and a team of framework-trained developers, as of 2021?
- gedy 3y ago> One semi-objective thing we lost was accessibility. TBH that's not a framework vs HTML issue, that's just sloppy or inexperienced devs
- chii 3y agoI argue that it is a framework issue. If the rendering framework doesn't support accessibility as a first class citizen (or better yet, automatically creates/makes accessibility part of what is rendered), then the framework is not suitable for production use.
- LudwigNagasena 3y agoReact simply diffs the DOM and updates it in an efficient way. If you are putting weird divs instead of anchors and buttons (or instead of special components provided by a React-based framework), that's entirely on you.
- chii 3y agoif you're using react and then hand roll custom components and don't do accessibility, then it's just as bad as choosing a component framework which doesn't do accessibility. I am not talking about react (or any framework directly) specifically. > entirely on you of course - choosing a framework or hand rolling one makes no difference. It's still not production ready, if it doesn't have accessibility built in.
- MrJohz 3y agoI think the point they're making is that you'd have the same problems with developers working HTML-first. Accessibility does not simply come for free in either situation, you need to make sure it's present. Choosing, for example, whether to use a div with a click handler, or a proper button, is a decision you need to make regardless of whether or not you're using a framework. So it seems incorrect to say that you lost accessibility in this case due to the framework. You lost accessibility due to developers who didn't understand the web platform well enough to design proper accessible controls. If they hadn't used a framework, they'd probably still not have made the site accessible.
- chii 3y ago> developers who didn't understand the web platform well enough to design proper accessible controls. And i actually think that it is _better_ for a developer not to have to do their own accessibility controls, but delegate this problem to the component framework. They have to know about the problem, but not have to spend cognitive budget thinking about it while they compose their UI from framework components - this should _automatically_ be taken care of by the design of the framework.
- matijsvzuijlen 3y agoWhat could the frameworks do to make it more natural for inexperienced developers to do the right thing?
- codeptualize 3y agoThis article had as a “good” example a div with an onclick, I think he fixed it, but it shows a lot.. Frameworks also have linters that will help a lot, it’s on you to use them