The unreasonable effectiveness of simple HTML
shkspr.mobi
shkspr.mobi
The standard widgets are all accessible, people with screen readers, limited mobility, poor vision, etc, all rely on pages being written so the devices they use to read the web can function properly. People who choose to eschew these standard components very frequently end up with a site which is unusable for disabled people.
Very few people have the skill to turn a div into an effective button, yet over and over I see web sites with rows of buttons which are in fact just divs with javascript behind them.
Making your site accessible isn't just a good practice, in the US, it is the law. Courts have ruled that the ADA applies to web sites along with any other type of business. A small sample of sites where people thought they could smash together super-fancy sites without concern for basic needs of users: https://www.atilus.com/top-10-ada-lawsuits/
My wife and I have watched a lot of TV in the past year with the volume down and captioning on, while we enjoy some down time while our baby is sleeping.
A ramped entrance to a building allows wheelchair-bound folks access, but it also helps able-bodied people using delivery dollies.
Making simple, lightweight web pages makes them accessible to those with older browsers and devices, but it also saves power consumption, time, and frustration for folks on M1 MacBook Pros.
I really love how Microsoft's design team has pushed this with their “Inclusive Design” concept[1] and highlighting how any sort of disability can be situational (holding a baby), temporary (broken arm), or permanent (missing arm) but we often only think of those in the last context despite there being orders of magnitude more people in the first two categories. Parenting is really good for showing this out since you get the need to be quiet, be able to do something using only one hand (or none), navigate sidewalks with a stroller, trying to do anything while sleep deprived, etc.
There's a great chart on page 42 (“Persona Spectrum”) of this PDF which I try to get every team I work on to go through which really gets people to think about what this means:
https://download.microsoft.com/download/b/0/d/b0d4bf87-09ce-...
2. Microsoft makes software which costs a lot of money (for most people in the world); often a lot of money. One of the main problems people with disabilities have is low income and lots of expenses.
3. Microsoft makes software which hogs resources and thus runs poorly, or not at all, on older or simpler, low-power devices. This also not very accessible. So it might have a perfect UI experience - on the computer people don't have. Admittedly, though, this is not as bad of a problem in the past few years.
4. I wonder how actually accessible MS apps and Windows actually are. Considering how they've botched a lot of their designs in recent years even for normies (Metro; Ribbons).
Similarly, while Microsoft software isn't free nothing in computing is and it seems like an odd angle to criticize an effort to help make their products better based on decisions made by other people in different parts of a huge company, or to criticize them for things in the past which they've since corrected.
I just wanted to point out the irony that the manual and other documentation for this "inclusive design" toolkit come as PDFs – the worst choice you can make if you strive for accessibility.
https://en.wikipedia.org/wiki/PDF/A
PDF/A is a small family of sub-formats to PDFs which amount to the accessible subset of PDF + some requirements.
PDF/A and PDF/UA are mandated by a variety of governments for PDF distribution. They're very suitable to archival and are accessible (screenreaders can work with them, their text can be cleanly copied, etc).
As long as it has actual text and is reasonably typeset (selecting text in this pdf seems to work properly), I don't see what's wrong. I'd take it any day over webpages with random floating content that you have to click through and use a modern browser with javascript without blockers/filters for the content to even render, in small text on 20% of the page, with low contrast and somehow broken zoom.
This really challenges the view that thinking about disabled users is catering to the needs of a small group of the population. Whereas in fact it is bringing benefits to the majority of the population (at some point in their lives).
Disability is just the fine print.
I remember walking around in a city after a parent died, and the world seemed like an illusion.
Then I wonder if in a parallel universe I'm already dead.
Then I realize that if there are parallel universes there are probable countless times where I'm already dead.
Ever used your phone in the blazing sun, or rain? Had a partly shattered screen or tried to do something on the stone-age library computer? Searched for something with really slow or shaky connection? Tried to explain where to click via phone?
Suddenly all those accessibility features and "fail gracefully" come in really handy.
"We're all just temporarily abled."
is quite famous quote, as far as I traced attributed to Cindy Li.I like how Apple TV now lets you pair two bluetooth headsets. My wife and I can watch shows without waking the baby. Combine that with the visual sound indicator on the baby monitor, and headphones with transparency mode, we can see when the baby is making noise and hear other environmental noises too. It's a nice combination of accessibility features that make a clever setup for hearing the TV. I can't wait until Apple TV supports spatial audio... then we'll have "surround sound" in our headphones too!
I use closed caption when possible because often I don't quite hear things right and can't make out words. I could turn up the TV, but this means I can enjoy it at the same volume as everyone.
There is also sort of "exclusive design" that is practiced. You know - where you can't get comfortable on a park bench because you might sleep on it, or a ramp or stairs are built to exclude skateboards.
Same thing happens with websites, to "control" adblockers or "reader mode" and other nonsense.
Did you mean to say ". . . for folks /not/ on M1 Macbook Pros"?
This seems to imply that web sites are businesses. If my hobby sites are subject to this, I'm going to be in trouble.
(Complete list of public accommodation is 24 USC §12181(7)--https://www.law.cornell.edu/uscode/text/42/12181).
> The term “commerce” means travel, trade, traffic, commerce, transportation, or communication
It is pretty funny that their definition of commerce includes commerce, but seems like communication is on the list as well.
> The expression "platinum" means platinum, iridium, osmium, palladium, rhodium and ruthenium
https://ec.europa.eu/digital-single-market/en/web-accessibil...
How big an issue this is depends largely on how big your hobby site is.
Update: I think this might even be wrong, its likely personal sites are fine. It's still good practice though!
What was the catalyst behind this trend? I just don’t understand the reason behind it. Hasn’t <button> been around forever? Was there some limitation on the button tag that made the div tag more desirable?
There’s no good reason to just not use buttons these days, but for a long time that wasn’t the case (cross platform).
And, as you mention, the default styling was typically "make it look like the button in the underlying OS".
So there was a lot of inertia from existing code, examples, and docs that predated buttons. And a (misinformed) avoidence of it when it did appear because of styling.
Since it's introduction, jQuery was born and died. Backbone was created and became obsolete. React took over the internet. Webpack, babel, and node were invented.
With all that change, I think it's safe to say web technologies are adopted or not based on inertia.
I think you are being over-generous.
Also, FWIW some of the problem is with the browser makers (still!!). CSS still has a lot of browser specific quirks when working with some components.
Designers absolutely need to be aware of and work within their platform's constraints, like a painter needs to understand and work with the physical characteristics of their canvas. It's this kind of mentality that results in visual specs that read "Make the window look exactly, to the pixel, like this Photoshop image!"
This subthread is about why divs are used for buttons and why developers reimplement existing HTML components poorly. Good designers help their teams avoid this, good engineers work with their designers to avoid it.
0: https://www.gov.uk/government/organisations/government-digit...
It’s funny - I’d expect an interior designer to know something about the limitations of the materials they work with.
Why don’t we expect this of digital designers?
It looked good. But hardly worked.
Apparently the web hasn't really changed in that part: we're still churning out HTML that hardly works, but "looks good".
I created a minimalist CSS framework called Neat CSS (https://neat.joeldare.com). I use anchors instead of buttons and explain why in the quote below. I'd love feedback on the accessibility of that alternative.
It's best to use semantic web tags whenever possible. Buttons are a unique case where you're typically linking somewhere, but the button tag doesn't currently support the href attribute. So, buttons are anchor tags with a class of button.
An anchor tag that links to another page but looks like a button is probably fine. So long as you can access them via the keyboard (tabbing to it) and they have a distinct appearance when focused so if you are tabbing through you can see whats active (this is different from the hover attribute).
You can drag it to your tab bar, bookmarks or desktop, middle click to open in a new tab, copy the target URL etc.
With a button you can push it.
> This is a fantastic article, it does miss one very key point about bog-standard HTML which is worth mentioning though.
> The standard widgets are all accessible, people with screen readers, limited mobility, poor vision, etc, all rely on pages being written so the devices they use to read the web can function properly. People who choose to eschew these standard components very frequently end up with a site which is unusable for disabled people.
> Very few people have the skill to turn a div into an effective button, yet over and over I see web sites with rows of buttons which are in fact just divs with javascript behind them.
Using a div as a button is not "bog-standard" HTML or a "standard component". Use a button and be done with it.
Using React or whatever does not prevent you from doing this, and in fact makes it less obvious to anyone doing a cursory review. I've not seen any difference overall in the amount of people knowingly using divs as buttons with plain HTML vs whatever framework, but I have seen an increase in unknowingly doing so by importing a calendar widget or similar without reviewing it.
Fully agree. In fact that is exactly point I was trying to make.
<div className="button" onClick={handler}>
and it immedaitely sticks out as a mistake. Because its easier to statically understand these mistakes, theres even tooling to automate detecting some of them as you type https://www.npmjs.com/package/eslint-plugin-jsx-a11y> <div className="button" onClick={handler}>
> and it immedaitely sticks out as a mistake. Because its easier to statically understand these mistakes, theres even tooling to automate detecting some of them as you type https://www.npmjs.com/package/eslint-plugin-jsx-a11y
I'm not sure how you got that out of
> I have seen an increase in unknowingly doing so by importing a calendar widget or similar without reviewing it.
I'm referring to:
<div class="div-button" onclick="clickHandler()" />
VS: <SomeGreatNpmWidget onClick={clickHandler} />
The point of using components is so that you don't have to look under the covers to understand them at a high level, but that also means if you don't look you don't see how they're breaking accessibility.> Using React or whatever does not prevent you from doing this, and in fact makes it less obvious to anyone doing a cursory review
Sure. From that level it might not be apparent, but within that component the mistake would be immediately obvious, on a cursory glance. Again, I don’t think React or whatever makes this less obvious.
But really, this just isn’t a problem I’ve seen in practice. Because of good tooling, and the ease of doing things the right way, I think the majority do it well. Those that don’t were going to fuck it up regardless of the framework or paradigm.
You can add role="button" and a modern browser will treat it just like a normal button and all the accessibility that comes with it.
[1] https://darekkay.github.io/presentations/accessible-web/reso...
HTML covers text, painfully basic tables, semantic rectangles (<nav>, <aside>, etc.), form inputs, and embedded media. Basically, anything you could build with a word processor. Outside of that, you're on your own.
JavaScript and CSS are continually improving and are so much more capable than they were even five years ago, but it feels like HTML is just stagnating. Why can't we have new elements every year, with behaviour? Stuff that works just fine out of the box, but can be easily tweaked with CSS or a little sprinkling of JS. The amount of developer time and bandwidth we could save not having to re-invent the wheel for every little thing.
but your cited site is not a good advocacy of that. Not even the most exalted UI framework fix the most obvious problems with those either. e.g. tables still won't hold the header and first column(s) while scrolling.
Most of the these elements does not help consuming information, like carousels. And any true UX designer abhor them all for the fallacy they are.
https://caniuse.com/css-sticky
position:sticky works on tables.
even the grand-parent, javascript infused solutions, only two out of 20 support this extremely basic and obvious use case.
Web UI standards are a joke. Everyone involved only cares about rich ads and accordions/carrousels which are lame ways to shove lots of content in a badly designed space.
[1] https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/
[2] https://chrome.google.com/webstore/detail/axe-web-accessibil...
1. https://github.com/chanzuckerberg/axe-storybook-testing 2. https://storybook.js.org/docs/react/get-started/whats-a-stor...
edit: actually it's spelled https://pa11y.org
Products like Siteimprove are targeted at Enterprise (e.g. demos with sales weasels, unpublished pricing, etc). They mostly suck but check an auditing and compliance box.
It might not get rendered the same everywhere depending on the device receiving it.
If the goal was to send pixel perfect pages, the web would have settled on postscript + hyperlinks.
> Courts have rules that the ADA applies to web sites along with any other type of business
For a business like a coffee shop I'd imagine that accessibility is codified in law through things like building regulations (ie, you must have n disabled parking spots per square foot, a disabled toilet, etc)
Is there an equivalent legally codified and enforceable standard for the web?
More or less yes. The link I posted has a few good resources, but generally speaking sites need to work with a screen reader and they need to be accessible via the keyboard (which by extension enables other accessibility devices).
This site has some more guidelines. https://www.essentialaccessibility.com/blog/ada-guidelines
Generally speaking, if you start with existing components that do the thing you want done, you have a huge leg up. If you try to reinvent the wheel, you are likely in for a lot of trouble. The more complex the control, the harder it is to roll your own. Calendar controls and Selects are particularly tough to get right.
UPDATE: Also, the wc3 has some good guidelines which should cover your ass.
> In this course you’ll get hands-on experience making web applications accessible. You’ll understand when and why users need accessibility. Then you’ll dive into the "how": making a page work properly with screen readers, and managing input focus (e.g. the highlight you see when tabbing through a form.) You’ll understand what "semantics" and "semantic markup" mean for web pages and add ARIA markup to enable navigating the interface with a range of assistive devices. Finally, you’ll learn styling techniques that help users with partial vision navigate your pages easily and reliably.
Gahhh. I use either an <a> or a <button> and put style on it. Has all the same visual appeal of the equivalent div. But it already is a button.
Generally, it should be noted that an <a> tag is only appropriate if it makes sense to right-click this element and get options to "open in new tab" or "add to bookmarks". All the stupid "buttons" implemented as <a href="#"> + e.preventDefault() need to die.
Later on, when people started treating web design as a general purpose graphical and GUI framework, many of the accessibility benefits probably vanished.
General accessibility be damned.
<noscript> fallback messages be damned. (Except when snitching on your page views to Google Analytics, that's too important to be neglected! I wonder if GA has any default marker to let their customers distinguish these views from normal ones, or if that's still left to each customer to implement manually.)
UI customizations in the form of browser extensions and styles be damned.
Ad blocking be damned.
Rendering HTML on the server is not really "the default" anymore as it was 10 year ago: it's more of an optimization for when your React site is slow, and it's a black box to most people. Even static websites are "strange tech" to new graduates outside the HN bubble.
Also, developers hate mixing tech. You mentioned an "interactive map" in your example. This can be made with React or something like that, right? The issue is that a lot of developers will want to use React for everything else on the page, because they think it's "icky" to use other kinds of tech in other parts of the website. They sorta have a point (the "microfrontends" discussion was a thing a couple years ago), but on the other hand they're not considering the tradeoffs.
Also, the frontend is officially the centre of the application on medium sized companies (50+ devs). It's way easier to add new code to the frontend and spin another microservice than to coordinate between multiple teams of backend engineers.
I'm not saying this is good or bad, btw. It's just how it is.
EDIT: One thing that really bothers me that people fresh in the industry don't really believe that websites were faster 10 or 20 years ago, so I don't really see any light at the end of the tunnel. Sure we can do new things on the web, but what was already possible before has been made slower by our collective refusal to "use the right tool for the job". Even the frontend tooling today is very heavy and slow, and I'm in a 2020 MBP. I don't think we progressed much. React is an amazing idea (and the implementation is great), but the community has become too dogmatic.
I ended up at a new school creating a new curriculum. This approach is where we "recapitulate the evolution of the web", so we start with SSGs & server-side programming (Python/Django), then only at the end cover SPAs and React.JS -- since, as you mentioned, that's still the main skillset that companies are new devs for.
It is though. I work on an app thats 80% react and 20% rails SSR and when working on anything, seeing that an area that needs change is written with SSR makes the job 10x harder as you have to come up with alternative methods to get it working or just rewrite it in react. When everything is react everything is quite easy and you can pass around data and update things without a refresh easily.
Without details it's hard to know what you mean. Do you have an example?
So maybe a simplified view for me is: massive adoption of JS + frameworks, cookie cutter development, no point learning anything else when you have the golden hammer.
I actually thought you still did learn HTML and stuff before the digging into the frameworks. But maybe it is analogous to learning assembler before python, i.e out of fashion and not needed to get the job done.
In this context what seems like the simpler and more suitable solution to me (static HTML+some minimal JS) might not be on the map for most modern web developers. What they do is overkill but it is what they know and it gets the job done.
Does anyone remember Google Web Toolkit when Java came to the front end.
History repeats. Again and again.
SPAs were for a specific, narrow, set of use cases where it really didn't make a lot of sense to even have a backend...
Companies don't really have the incentive to build good software, though. Fads and cargo cult 'lets use this popular BS' tend to catch on more when the name of the game isn't software, rather its about pandering to a job market. Outside of sudden and painful corrections that market seems to promote bad engineering, probably because it costs more over time to maintain and thus creates more demand in a 'negative' positive feedback loop...
Trying to legislate it back in by pointing out that most sites are hot piles over garbage that are unusable by anyone with any sort of impediment (physical, technological) seems like a nice idea, I don't see much growth in that area anyways so perhaps it is time for strict law enforcement...
I often need to very quickly make internal services at my job and while I like working in other languages (and i do for longer term projects), those always take longer to set up and get working. In js with next you're up and running in less than 60 seconds and if you're doing crud stuff, most of the work is frankly done for you.
Rails was already faster for CRUD apps back in the mid-2000s. Batteries included, maybe a gem or two for an admin panel or for auth. Not that it matters, but rails new is probably faster than 60 seconds too. Django is pretty good too.
ASP.NET Webforms was made for CRUD, and it even provided a WYSIWG designer back in the early 2000s. And it was just a matter of launching Visual Studio and creating a new project. Again, doesn't matter, but it was/is way less than 60 seconds, and a lot less fiddling. Webforms got an MVC version a few years later if you prefer that. And they haven't stopped: Blazor is new-ish and very productive, and runs both in the backend and in the frontend (using WASM).
Both Rails and Microsoft tech also give you a backend, which you're not putting into your equation. Sure you can have a Backend in JS but the experience it's nowhere near as ergonomic or as fast as using Rails or ASP.NET.
Sure, if you're comparing with building an app in Xcode or Android Studio then JS tooling is faster to use. But if you compare to what people were using to build CRUD for the last 20 years then JS is not really special. For interactive frontend apps? Then it's a different discussion. But for CRUD, modern JS is not that special.
I would say though, that for very quickly creating new applications that get the job done, js has been the fastest for me. And while django and similar give you more database stuff to work with, honestly that feels like a solved problem, and it's often easier to not have to do any backend work at all, and instead use something like hasura. And next does include backend code too for functions that you need to write for the backend.
Obviously, this isn't ideal for a lot of problems. I think if you can get away with it, you can be really productive. I've made crud apps for work with this stack in very little time.
React sucks for large complex forms unless you pair it with another technology or two.
Want to write a crud app fast? C# and Winforms.
Couple years back, I once did a prototype of a web app in C# and Winforms connected to Firebase. Less than a day, done.
Month later, had it working in React. Granted the React website looked nice, but the difference in efficiency is huge.
Data binding 20 fields on C# is a matter of minutes. Data binding 20 fields in React, and with Redux, ugh. I really should have just learned Redux Forms.
And for any given forms library in React, you then get to practice learning how to beat it into shape and style it how you want.
I, no kidding, think writing CRUD apps was easier with VB6 and Microsoft Access.
Yeah working with redux sucks in general imo, I try to avoid it when I can. If I can get away with it, I try to avoid the problem entirely by using hasura as a backend. But sometimes that's not viable.
I hadn't used C# for years, I was shocked that the winforms designer duct taped to a community contributed Firebase library, was able to get a prototype out in hours.
I had been using JS for 2 years at that point. I estimate at 10x-15x productivity boost in C# over JS.
The C# tooling is just that good.
Now if I'd been trying to learn XAML or something at the same time, eh, probably wouldn't have gone as well.
Of course the downside here is that a Winforms app is hard to distribute, and usable only on Windows desktops.
The react web app was, well, beautiful, and usable everywhere.
But I could have written the C# app once for every platform I care about and still been better off.
Ugh, I am sad that Winforms is only ever going to be Win32 based.
- How do you do validations?
- How do you handle database migrations?
- How do you handle background jobs?
- How do you handle authentication?
- How do you handle authorization?
- How do you handle file uploads (to filesystem or S3)?
- What ORM or database toolkit do you use for queries?
- How do you send emails?
- How do you do websockets/real time?
All of these of course have answers, but each one of these comes with a lot of "decision fatigue", discussions, maintenance work and I highly doubt the cost of reaching the same level of robustness of a full stack framework is any smaller.
Real life production "CRUD stuff" is not just some http handler doing sql inserts into sqlite. There's a lot more involved. That's what Rails/Django/Symfony give you a solution for. I agree Next.js could have a faster startup for a landing page. But as soon as you need the most minimal backend, you are way, way, way further to get something robust working if not using one of the full stack frameworks.
This isn't to hate on JS, this is just to acknowledge that other languages and frameworks have substantial advantages in many use-cases.
I've worked with Django for over a decade and i dislike it more and more. It hasn't evolved to match the environment around it and how to best use it. Typing is missing. Something like FastAPI is very promising but Django's admin is still superb for prototyping and its orm is a lot more instinctive so i put off switching away ...
I only brought up Django in a narrow context to challenge an assumption made by the post I was replying to, that seemed to imply that JavaScript ecosystem is indisputably the fastest for rapid prototyping. Hence my providing of a counter-example. I think this is especially true for new coders, as having certain things out of the way is super vital to keep motivated when building MVPs -- I've seen many students give up on ideas simply because implementing authentication with a Node.js-based stack was too challenging, when they would have been happily coding away had we been teaching a batteries-included framework (django / rails / etc).
You mean if you have customers with less powerful devices like the OP? I don't really see internal services or B2B products having that problem.
> the Javascript ecosystem is unmatched when it comes to very quickly creating frontend applications
Didn't hinge on whether you were creating internal tools or not. You simply used internal tools as an example of what you personally do with JS.
Much has been written on this. Here's an article from 2018. (I realise the irony in that it's hosted on Medium.) https://medium.com/@addyosmani/the-cost-of-javascript-in-201...
You can (and should) monitor page load performance... using JS
However:
1- Progressive is expensive. You'll need more time as you need to sort what features can work; and work your way up to the full experience. The full experience, however, is what you are getting paid for (or showing). Unless the client or the company cares about these categories, you don't want to expend budget on that.
2- Web development is becoming complicated. You can get started quickly with Nextjs/Gatsby thanks to "DX"(Developer Experience). The reality is that you don't understand much of what's going on behind the surface and if you bootcamp-ed your way in 3 months, you probably have no idea what's going on. But it works!
1. Ads/trackers/etc. need javascript 2. It's a way of flexing and saying "we have resources to put into this webpage which makes us a serious business."
Any other thoughts?
- Toggling widgets such as menus, modals and other things you only want to show when the user requests it. This includes updating accessibility related HTML attributes.
- filtering, sorting etc. of larger data sets in the client.
- live updates of fresh, time related data
- search that doesn't force a complete reload, via AJAX or cached on the client.
- smoother page / content transitions via AJAX
- everything related to forms / user input: you want to instantly react
- managing and preserving state / context per user
- visualizations / graphs that are explorable / interactive
- polyfills for older browsers that don't support optimizations such as lazy loading.
- interactive widgets such as chat boxes (not a fan but still)
- testing and analytics
A website isn't made of paper.
Two other possible reasons from the top of my head:
If a web developer is hired to make a site they can probably charge more if it is a fancy javascript site. In some cases it might be in their self interest to up-sell this to a client that does not know better.
If a web developer makes a site for themselves I am sure many want to take the opportunity to get some experience in the latest web-tech while they are at it. Just as I will use an obscure programming language for my next side project..
On blogs and news media site? mostly ad tech .
The irony is that it took AMP, a proprietary solution, for all these websites that mainly deal with text and image, to start cracking down on all that stuff.
Remember "mobile first"? Well the majority of web developers clearly do not have a Mobile first strategy, when you look at how heavy their webpages are.
Even the javascript could be lighter, but since everybody is using node.js and NPM behind the scene with a lot of complex modules, well code bundles become crazy big.
I suspect much of the superfluous JS comes from a " if you have only a hammer, everything looks like a nail" mentality.
What's with all the server round-trips? If you have a UI that takes user input and just reacts to it, without any data needed from the server -- why should it go on a full round-trip just to get a new UI element that it could create locally just as well?
Look at other things on your computer: a text editor, or a calculator. Would you expect every interaction to send a request to some remote server just for the sake of it?
Moreover you are confounding apps with the web. A calculator should probably never use the network...
Pretty much every web browser can and has to open and send network packets - as long as they are small and there is not a lot of state, you are fine. You can support almost any device from 20, 30 years ago.
'Modern' JS dogpiles huge swathes of mostly unused, uncompiled code, resulting in huge network transfer costs, extreme overusage of CPU and RAM, and encourages a lot of e-waste because it mainly only works well with the latest devices...
It's arguable that this is such a bad engineering design, just to save some network packets, I wouldn't be surprised if the carbon footprint of a JS developer was at least similar to that of burning coal...
Developer productivity: Making complex pages and reusing components across pages is much easier with a library like React than with more vanilla approaches. For a lot of companies with large numbers of engineers, making sure that engineers can be productive without intimate knowledge of HTML/CSS ends up taking priority over things like performance and accessibility.
Branding/customization: The built-in HTML controls are difficult/impossible to style or customize. A lot of UI designers will design some fancy looking select dropdown, not appreciating the fact that they're forcing developers to reinvent the wheel in order to implement their design. Alternatively, there are cases where the UX for built-in controls is lacking enough that you're somewhat forced to implement a replacement (e.g. <select multiple>)
Maybe I'm wrong, but as far as I can tell, you can't have both. Sorry folks.
You are right, JS is not needed if the site truly is static content. But if you try to make an interactive app that could be implemented client-side (AKA javascript) and attach a server to it, everybody will complain that the application doesn't respect the user's privacy, since it could be offline-only but it's not.
Don't get me wrong, I think "interactive" can meaningfully include a simple site with links if you are looking at it from a privacy angle. Just look at how StackOverflow recently was able to track all the pages their hacker viewed. [1] SO is pretty much static content. So do you want StackOverflow to work without JavaScript? Are you happy that in-so-doing it needs to phone home whenever you look something up? You can't have one without the other.
There is also the argument from scalability. You'll get less QPS on your servers if you implement a 3-step form with validation in the frontend, and send off all the data in one go. It's also faster/better UX and is more resilient under bad network conditions.
Edge computing is maybe an alternative there, but that doesn't address inherent privacy concerns of phoning home to a server.
Last there is the reality of a spectrum of interactivity of websites. If you are doing a blog, sure, don't do it in JS. At that point you make a decision to make it difficult to add any interactive features to you site which require JS. If you are building an evolving app with interactive features, there aren't many options for easily mixing static HTML with interactive JS. You could see how far you get with static HTML but then what if you need interactivity (JS/JQuery)? What if you need complex interactivity (React)? Are you willing to pay the costs of a heterogeneous app architecture of HTML mixed with interactive JS?
Think of Facebook. It is kinda like a blog, but what about infinite scroll? Etc.
Anyway that last point, I think, is why people are excited about 37signals' Hotwire[2]. It's more of a HTML-but-interactive architecture as opposed to the fully-interactive JS/React vs static HTML forms.
[1]: https://stackoverflow.blog/2021/01/25/a-deeper-dive-into-our... [2]: https://hotwire.dev/
> You are right, JS is not needed if the site truly is static content. But if you try to make an interactive app that could be implemented client-side (AKA javascript) and attach a server to it, everybody will complain that the application doesn't respect the user's privacy, since it could be offline-only but it's not.
That's the gist of it. Don't use JS if not absolutely needed (or at the very least, don't make the site break without JS enabled). If needed, consider whether there is a valid technical reason why this should be a server-dependent web app in the first place - and if there is, consider supporting off-line mode where possible anyway.
It's a perfectly valid position to hold. It's a user-respecting and waste-minimizing view.
Also, noone would even think that it is unreasonable for a WEBapp to phone home. What people have trouble with is tracking, that is orthogonal to the current topic and should be condemned.
My card actually expired in the middle of the countryside, and phone support just told me to get a replacement in the nearest convenience store.
I could have been prepared for this if I had checked the expiry date and put it in my calendar, but how many people do this?
btw, apologies for typos in my post above, it went quick, and was typed on touch screen.
> Go sit in an uncomfortable chair, in an uncomfortable location, and stare at an uncomfortably small screen with an uncomfortably outdated web browser. How easy is it to use the websites you’ve created?
It's so easy to get disconnected from the real-world applications of our technology. Build user empathy.
As a test, my team all went home and practiced being the user. We had a test email sent to our email addresses we would open first thing in the morning and attempt to make sense of it while laying in bed.
The result was a lot less cruft, bigger text, and key takeaways above the fold.
Our team was doing in home interviews for a TV product. One of the customers subscribed to an expensive sports service and yet barely ever watched it.
When we probed it was because her two sons had left home in the last year and she knew they would come home when a game was on if she had the service. She said that she wish she knew when big/popular games would be coming up so she could invite them around and see them more often.
We trialed a fortnightly email newsletter for people that were subscribed but not very active. And saw a decent uptake in viewing almost immediately.
In terms of dispassionate product analysis, nice job using emails to reengage users at risk of churning out.
I posited that it would be an interesting user test to have someone who was in an irritable mood try to use your product. I've never actually done this, and I still think it would generate interesting feedback.
The guy behind the site will get drunk and then test out your website.
The problem is that people want to make dynamic applications that have a rich UX and deep system integration while being highly portable.
Unfortunately, it turns out that "portable" is basically a Great Filter for applications. If you can't run it, you can't use it and the rich UX and deep system integrations don't matter.
So developers cast about looking for alternatives to Qt and GTK and friends. Flash and Java (and Silverlight....) all had browser plugins and offered vaguely convenient APIs for building applications with rich UXs. Unfortunately those plugins had inherent technical issues and died (or were killed, as it were).
So what platform remained that had super easy distribution and portability? A XML document format that supported directives for styling xml and some rudimentary scripting language that could dynamically change that xml and styling.
So that's what ended up getting built upon. And now, since abstraction can do anything, we finally have things resembling what we had 30 years ago in desktop applications but built on top of a standardized runtime with a JIT and a sandbox and a nascent assembly language. So that's finally what people use.
I really had nothing but disdain for web applications built with javascript/jquery soup for the longest time. They worked, sure, and printed money and all that, but I was bitter that such poor technology was what won, instead of some evolution of the existing desktop app paradigm.
Now with React et al it's finally getting bearable again. But I still find myself wishing I could just say forget all this web junk, I could write this as a Swing or JavaFX program in 10% of the time.
(It's just unfortunate that nobody would be able to use it because nobody downloads programs off random websites anymore except Putty and nobody has an (independently-installed) Java runtime anymore. Which brings us right back to the initial problem).
You mention Swing, but I remember lots of my non-programmer friends dreading having to use applications made with Java, since they were considered sluggish and resource-intensive. They also had a certain look and feel to them that made them stick like a sore thumb compared to other apps, and a lot of people knew by looking when an app was made with Java.
Java was actually pretty fast even back in the early 2000s, but thanks to Swing et al (and to the JDK requirement), Java desktop apps had a reputation was much worse than Electron or JS-heavy websites have today. Especially among non-programmers.
Strangely, OTOH, Visual Basic had a terrible reputation among programmers, but most Windows users had no idea about it since it used native widgets.
It wasn’t exactly easy to make your own theme either. Something that HTML allows without almost without thinking.
Visual Basic was very... well, "basic", so it looked normal. Some tools like CCleaner and a lot of Antiviruses had fully custom looks, but didn't look out of place, because they were too different.
JavaFX looks fine, though.
But they do, just in javascript format! I still am bitter such a poor technology won.
I see slow websites with carousels of large images with big texts. They link to value statements, mission statements, experiences, goals, community bullshit. If you want to know products, prices, or even what the site is all about, you must squint your eyes and really concentrate, maybe scroll down to the bottom of the page. I save €1000 per year in impulse buys because of these sites.
This is particularly high praise for simple HTML as the shit part is likely the PSP's UI, which is of course out of the control of the website, whereas the it worked part is due to the PSP's browser and the website both working adequately.
Good on GOV.UK for doing it properly.
Past 8 years or so Youtube has nothing really more to offer then it was offering back then. The only new things it offers for me is overweighted dumb slow shit that fails to perform what it was perfectly doing 8 years ago, and all those slowness added for no particular reason that I could appreciate.
All of this ‘comfort’ is getting on the way or doesn’t work at all. Perfectly capable IPad Pro now is struggling to load even Youtube.
Almost every site I visit is bloated with idiotic unnecessary things that do not not even work properly.
And once you see some new idiocy appearing on some big site, the first thing you think is :‘oh no’ because you can be pretty sure that every “designer” would copy this bullshit and it will appear on every site very soon for no reason. If that is not a dumb design by definition then what is? I would not call it even design. Those are layers and layers of garbage piled on top of each other and at this point when I see simple HTML I just wish to thank the author for lack of so called “design”.
It’s not crappy browsers - It’s crappy sites overloaded with useless features. I didn’t see One big site lately that did become better ... not one! I wish to see one, show me one please. I wish to be mistaken there but I think it simply doesn’t exist.
Every time this happens I have this horrible feeling that they just removed showing video durations entirely. Which wouldn't even surprise me, I could imagine them doing some stupid A/B testing to discover they got more people clicking around when durations were removed.
But regardless, it's insane that one of the biggest sources of internet traffic on the planet is software that can render a bunch of images (thumbnails) but it takes several seconds to display a few characters of text on them. I don't know if they're grabbing durations as a separate API call, or if that's just how slow their JavaScript is. Either way, it's pathetic.
Citation needed. It's been two and a half decades since people started using the web as more than just a delivery mechanism for text and images.
I still do (mostly)
I wouldn't say that client-side JS is underrated though. If anything I'd argue that the modern web heavily abuses it. Try browsing twitter or youtube with Javascript disabled for instance. The site simply won't work.
But twitter is so ducking ridiculous in that regard. At its core it is a web site to share 280 character long strings, but as of recently you cannot do this anymore without JavaScript! They shut down the legacy page at the end of 2020 that was blazing fast and a pleasure to use. And what irritates me the most about their modern Js based mobile page is that it frequently happens that I tap a twitter link on HN which takes forever to load, then it shows two blue spinners one at the top and one in the center and then after another eternity it says "this content isn't available". Then I hit reload, the whole thing repeats and this time the 280 characters display just fine. How? Just how do you end up with this?
In the "old" web you could basically right-click -> save anything you want (ignoring plugin blobs for the sake of making my point more compelling). Meanwhile I tried manually scrapping a video from reddit the other day, I succeeded but it was quite the puzzle. First you have to find the right element in the DOM, then find the source which is a playlist for the various qualities available, then there was a 2nd indirection I think, then finally I got the URL of my video file.
My browser obviously knows about all of this but it won't expose it easily. No "Save video as" menu. For some reason I don't expect that Chrome will implement it any time soon...
That, and pushing more useds to the mobile application.
We must have different definitions of 'responsive'. You don't need javascript to make a website look different due to different screen sizes.
Flexbox is a CSS 3 feature. Support appears to have been implemented in FF and Chrome around 2012-2014 and still doesn't fully work in IE[1].
The fact that a site uses CSS and HTML instead of Javascript does not imply that it's easier for older browsers to display.
Javascript 1.0 was released in 1996.
In other words, plain HTML is responsive by default. You can improve things with CSS. But if your site is unusable on small screens, you’ve broken something with your “design”.
Old browsers (old IE especially) that don't handle those features aren't a problem because they'll just fall through to the screen style. Trying to use JavaScript to help old browsers is a worse solution as you're more likely to run into JavaScript incompatibility problems than CSS.
The upshot is you can now browse my blog with curl or netcat:
curl https://apitman.com/txt/feed
nc apitman.com 2052 <<< /txt/feed
I may switch to another format in the future. It doesn't matter much as long as it's readable as plain text.It doesn't let you add nodes inline, so things like emphasis or links become much more verbose.
Too many bosses and customers want fancy eye-candy without knowing and/or caring about the carrying cost of this bloat. Staff feels obliged to make them happy. All primates love "shiny red things", even humans, even if it's not rational.
K.I.S.S. is dead in IT. Fads and toys won.
It was rendered using Latex2HTML. The "next page" images don't work since they were links to a website that doesn't serve those assets any more, but the thesis is still completely readable.
How so? I dislike the text color choice, but other than that it seems perfectly fine to me.
My pet peeve is line length. Too long lines are not comfortable because it's difficult to find the start of the next line, that's true. But too short lines force you to find the start of the next line every couple of words, and that's annoying too. There's a middle ground somewhere, and I think it's not the same for everyone. The 650px used on the "better" size is certainly too short for me. I can't count the number of sites where I open the style editor in dev console and go hunting for max-width or whatever to set it to a more comfortable width. So just respect the width of the browser window, which anyone can choose to their own liking. Some margin left and right is OK, perhaps even preferable.
The other thing is font size. Browsers have settings for font size, and in modern browser you can change the size with ctrl+ and ctrl-. Why override that choice?
I like overview: being able to not just see the sentence I'm reading, but a whole lot of context. Short lines, large fonts and large line-heights all work against that.
What I do like, I think, is #444 for the text instead of pure black. Looks less aggressive that way. And some amount of margin left and right. Something like the original page plus "body { margin: 40px 100px; color: #444; }".
This shit is never fine.
Form <input>s without <label>s.
No skip link, no landmark regions.
<table>s with <div>s inside for non-tabular content.
<font> tags. FONT TAGS.
"A breath of fresh hair" is a typo that accidentally makes a good comparison.
For the reasons mentioned in this article—it's probably a good idea to keep plain HTTP access available on your websites.
If you support HTTP at all, you’re damaging the experience for the almost everyone that could have used HTTPS: almost no one will get the HTTPS version unless you deliberately push them over to it, which you will only be able to do after page load by some JavaScript-based user-agent or feature-based sniffing, so now the page loads and then reloads immediately, every time the user visits your site by URL, and you’re causing trouble with search engines, and it’s a regular maintenance burden because no one treads this path so you’ll have to figure out the cut-off points yourself as certificates change, and on top of that it’ll always be subject to a downgrade attack, so now you can’t ever depend on HTTPS.
Remember also that various new features are gated on using a secure context (which roughly means “HTTPS”), like HTTP/2 and HTTP/3. And as for entering passwords or the likes, you’d be opening quite a can of worms if you allow that over cleartext HTTP.
So… yeah, it sounds nice in theory, but I think that it’s just not practical or advisable to retain plain HTTP support. Even supporting TLS < 1.2 or older cipher suites is steadily becoming inadvisable, only to be used on a few sorts of websites. The unfortunate fact of the matter is that you can’t support ancient devices without harming things materially for everything else.
This is false. All you have to do is configure your webserver to only redirect port 80 requests to port 443 if the request includes the "Upgrade-Insecure-Requests" header. Obviously since headers are sent unencrypted this means attackers could easily bypass it, but it's still suitable for personal webpages with no user data. For example, here's how you do it in Apache:
RewriteEngine on
RewriteCond %{HTTP:Upgrade-Insecure-Requests} =1
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
Most websites don't even need HTTPS and the complications and sacrifice of autonomy required isn't worth it. Remember, there are no cert authorities that are human people. They are all corporations or institutions. Having to get an incorporated entity's permission to communicate will have dangerous consequences eventually. HTTPS everywhere is done with the best of intentions but it will be the centralizing push that provides juicy targets for government and corporate censorship.
The privacy of all users is more important than supporting the outdated browser on an ereader.
① An HSTS policy will protect people that have visited your site within max-age seconds, typically “within the last year”.
② An HSTS policy with preload will protect everyone.
③ HTTPS-only cookies will prevent them being sent over plain HTTP.
⑤ You could depend on various newer functionality that is only available in secure contexts <https://developer.mozilla.org/en-US/docs/Web/Security/Secure...>. For example, the Web Authentication API. (This also raises a good point about using the Web Authentication API for security: authentication is tied to the origin, so http://example.com, https://example.com and https://example.com.evil.example are all different origins and no one will be able to log in over the wrong origin.)
⑥ Any JavaScript code can check the origin and rebel if it’s not what you expect—in fact, I’d say that it’s very common to do this quite incidentally. This protects against a drive-by downgrade attack, increasing the effort required by the attacker who must now reverse-engineer a bit of your code.
① If it’s on the same domain, it would necessitate weakening the HSTS policy, removing includeSubDomains and preload.
② If it’s on a separate domain, you’re actively training people to do dangerous things and get phished.
③ Pretty much the only way this will ever be used is if you push people to it and ensure that search engines choose it rather than the secure version. (Implicit in this is a significant SEO hassle.) Thus you’re back exactly where you started.
I'm not willing to make security exceptions to support devices from 2011. "HTTPS by default" lifts all boats: people who would MITM your users can't tell if they're reading your nice blog or a critique of their local government, and that's a good thing.
That's 98.24% of users captured by CanIUse's sources (which seems to be StatCounter). Like most things on the Internet, that's a bubble - the bubble of users who visit statcounter-infested websites, and are able to run their scripts. And the point of the original post is to think outside the bubble. Not in all cases - if you're a B2B service, or selling T-shirts with slogans on them, CanIUse is likely a good enough source to base your choices on. But if you're a government website, or providing critical Covid-19 data for example, it's irresponsible to ignore these long-tail of users who fall outside expected and easily visible patterns. There's a spectrum between these two kinds of websites, and it's worth thinking about where you fall on that and how many you're comfortable with denying access to your website.
It's a tradeoff between security and accessibility, and we should at least be thoughtful about the implications of our decisions.
And honestly, I think a lot of people in the second group are there because they bought smartphone in 2007 and won't upgrade because "if it ain't broke, don't fix it". Well, now it's broken. Fix it.
This sounds like a personal consideration - one you're entitled to, but perhaps shouldn't force on others. Maybe consider Tor?
> ever-shrinking pool of people who can't/won't upgrade.
Are you sure about this? The kind of security you're advocating for here is a moving target. As the pool shrinks on the tail end, surely the head advances...
> Well, now it's broken. Fix it.
Erm, no. The device isn't broken, you are willfully breaking it. I can appreciate your stance, but glib comments like this aren't going to convince anyone in that camp.
It would be great if we could always automatically choose the right option, but browsers don't do that.
There is always an accessibility-security gradient, and there are trade-offs you have to make on every side. The needs of each user are different, and many would prefer to trade a lot of security for a lot of accessibility.
For example, if someone un-housed is only using borrowed devices, older tech, library computers, public wifi, many would happily trade some security for being able to let their loved ones know they're OK.
They're not worried about espionage or privacy, they just want to be able to send an "I'm OK" message to their family every day or two.
For this type of scenario, and many others like it, a simple http-accessible website behind a simple password is by far the best solution I've found to date.
This is such a quotable paragraph. It also reminds me of this:
"Do what you can, with what you have, where you are." - Theodore Roosevelt
The bottom line is right; rather than posturing, test your site - actually test it - on one of these browsers.
The vast majority of users will have even a rudimentary smartphone (some years ago I visited the Calais jungle to donate food and supplies, and whilst people were struggling to eat, they knew that a smartphone was a cheap, key thing to obtain and hold onto because they make accessing help and communicating with their support network possible) and or laptop that can handle some lightweight JavaScript and benefit from an enhanced experience.
In both scenarios, I'm trying to complete my task as quickly as possible while I still have a good connection. A simple HTML page (with JS layered on top for fancier stuff) would be plenty to get the job done. Instead you get hindered by sites that aren't optimised in any way for slow devices or slow internet.
Heard that Facebook before had "2G Tuesdays" where the product teams throttled their internal net speeds to 2G while browsing the site to see what it was like — that should be the standard for dev teams. The trouble is so many things are designed and tested by people on T1 broadband in a downtown office, but that's not the set-up of a majority of their users.
I wish. A T1 is 1.5mbit. CNN's front page is 6MB - 30 seconds at full T1 bandwidth.
How about when it is quite easy in many cases to support them, by using standard conform simple HTML?
Example: How many login forms have I seen, which will not show their input fields, if I do not allow their shitty scripts to run? In fact, just today I have seen it, on a VPN login, on a thing, that is supposed to give you security, I need to allow scripts, to have a login. Otherwise there is only a background picture. Thank you very much, so helpful! And then when I allowed their scripts, guess what. A text became visible, which told me, that in general scripts need to run in order to use the page. How much fail is that? They don't know the noscript tag or something?
That's only today's anecdote. I see this kind of fail every day, except for the days, when I miraculously manage to avoid all badly designed websites. It is getting worse and worse, because web developers seem to find it normal to, by default, reach for JS, instead of thinking about how they can solve the same thing using just HTML and CSS for a second or two.
I think it is still worth pursuing simplicity in web development. For the earlier example: Rendering a login using JavaScript is not simplicity. It is unnecessary, silly, and exclusionary without need.
So my message is: If your service can be done using plain simple standard conform HTML(5), then use it. It will also almost always have less bugs and be simpler code to maintain. Information display does not require dynamic pages per se. Usually it does not and many many websites are about information display, not impossible to solve via REST dynamic pages. Nowadays properly designed static websites are faster than badly designed JS heavy websites, which render on the client-side. The bloat has become this bad already.
Even cheap, old smartphones support JS. You can have fast, efficient JS.
This is often less about the developers not knowing a technique and more about the constraints they're working under. Maybe there's a third party auth library they're using that requires JS. Maybe either they or or their management have other priorities than removing JS from the login screen. It's not that hard to believe that scriptless login would fall fairly low on a team's priority list behind features more likely to drive revenue, etc.
From a purely economic point of view: if your competitor's website supports the visually impaired, and yours does not, then even though that's a relatively small market segment you're probably giving away 100% of it. And blind people have friends and family too, and they'll also send all of those people to your competitor.
In my opinion it's why it's especially important to have regulations here, free market won't save us because in most cases the ROI just isn't there. However this is wrong to abandon those people, thus we need incentives to force people to do the right thing.
How can government compel businesses to provide better experiences? Why, standards and regulations of course.
Social pressure in the form of "corporation xyz only supports ie6 for their bank website" is another way.
> If your laptop and phone both got stolen – how easily could you conduct online life through the worst browser you have? If you have to file an insurance claim online – will you get sent a simple HTML form to fill in, or a DOCX which won’t render?
Assuming my laptop & phone got stolen, I'd have a hell of a time getting through 2FA to my email and password manager. I can get other non-crappy devices. And I'd never log in through an untrusted device anyway.
If website owner gone wild he would just disable simple HTML frontend and would bloat you to download hundreds of JS-sripts.
Still curious, why Nitter CAN provide usable & modern looking simple HTML frontend for Twitter[0], but Twitter itself can't (guess, probably won't) do that.
Rich logging/event tracking needs JavaScript, in general.
Native Apps tend not to be HTML-powered, they're powered by APIs that can also power Web sites that use JavaScript, again, in general.
A lot of these corporate-ey features rely on JS.
It's more complicated, I know. But it's better.