A web for everyone

I gave the closing talk at the Render conference in Oxford a few weeks back. It was a very smoothly-run event, the spiritual successor to jQuery UK.

In amongst the mix of talks there were a few emerging themes. Animation was covered from a few different angles by Val and Sara. Bruce, Jake, Ola, and I talked about Service Workers and offline functionality. But there were also some differences of opinion.

In her great talk—I’m Offline, Cool! Now What?—Ola outlined the many and varied offline use cases that drove the creation and philosophy of Hoodie. She described all the reasons why people need the web; for communication, for access to information, for empowerment, and for love. “Hell, yes!” I thought.

But then she said:

So since when is helping people to fulfil a basic need, progressive enhancement?

And even more forcefully:

This is why I think, putting offline first in the progressive enhancement slot is pure bullshit.

Strong words indeed! And I have to say I was a little puzzled by them.

Ola had demonstrated again and again just how fragile the network could be. That is absolutely correct. All too often, we make the assumption that people using our sites have a decent network connection. That’s not a safe assumption to make.

But the suggested solution—to rely on technologies like local storage, Service Workers, or other APIs—assumes a certain level of JavaScript capabilities in the devices and browsers out there. That’s an unsafe assumption to make.

I remember discussing this with Alex from Hoodie a while back. I was confused by the cognitive dissonance I was observing. It seems to me that, laudable as Hoodie’s offline-first goals are, they are swapping out one unstable dependency—the network—for a different unstable dependency—a set of JavaScript APIs.

(I remember Alex pointed out that Hoodie was intended primarily for web apps rather than web sites, and my response—predictably enough—was to say “Define web app”.)

I think I understand why Ola reacted so strongly to the suggestion that offline functionality should be added as an enhancement. I’ve seen the same reaction when I’ve said that beautiful typography on the web is an enhancement. I think that when I say something is an enhancement, what people hear is that something is just an enhancement. It sounds belittling. That’s not my intention, but I can understand how it could come across like that. Perhaps this is one reason why some people have a real issue with the term “progressive enhancement”.

I wish we could make offline functionality a requirement. But the reality is that not everyone is using a browser that supports the necessary technology. I wish we could make beautiful typography a requirement. But, again, the reality is that there will always be some browsers or devices that won’t be capable of executing that typography. Accepting these facets of reality might seem like admissions of defeat, but I actually find it quite liberating.

In her brilliant talk at Render, Ashley G. Williams channeled Carl Sagan, quoting from his book The Demon-Haunted World:

It is far better to grasp the universe as it really is than to persist in delusion, however satisfying and reassuring.

That’s how I feel we should approach building for the web. Let’s accept that network connections are unevenly distributed. Let’s also accept that browser features are unevenly distributed. Pretending that millions of Opera Mini users don’t exist isn’t a viable strategy. They too are people who want to communicate, to access information, to be empowered, and to love.

Pointing out that you can’t always rely on client-side JavaScript shouldn’t be taken as an admonishment. It’s an opportunity.

Karolina Szczur wrote a wonderful piece on Ev’s blog called The Web Isn’t Uniform. She noticed how many sites—Facebook, AirBnB, Basecamp—failed to even render some useful information if the JavaScript fails to load. It’s a situation that many of us—with our fast connections, capable browsers, and modern devices—might never even notice.

It’s a privilege to be able to use breaking edge technologies and devices, but let’s not forget basic accessibility and progressive enhancement. Ultimately, we’re building for the users, not for our own tastes or preferences.

Karolina asks that we, as makers of the web, have a little more empathy. If the comments on her article are anything to go by, that’s a tall order. All the usual tropes are rolled out—there’s the misunderstanding that progressive enhancement means making sure everything works without JavaScript (it doesn’t; it’s about the core functionality), and the evergreen argument that as soon as you’re building a web “app”, that best practices, good engineering, and empathy can go out the window…

I strongly disagree that this has anything to do at all about empathy. Instead, it’s all about resources and priorities. Making a JS app is already hard enough, duplicating all that work so that it also works without JS is quite often just not practical.—Sacha Greif

But requiring that a site be functional when JavaScript is disabled, may not be a valid requirement anymore. HTML and CSS were originally created and designed for documents, not applications. Many websites these days should be considered apps rather then docs.—Dan Shappir

What you’re suggesting is that all these companies should write all their software twice, once in javascript and again in good ol’ html with forms, to cater to that point-whatever-percentage that has decided to break their own web browser by turning one of the three fundamental web technologies off. In what universe is this a reasonable request?—Erlend Halvorsen

JavaScript is as important as HTML. This is modern internet. If someone doesn’t have JavaScript, they should not be using the new applications that were possible because of JavaScript.—HarshaL

I am a web developer. I build web applications not web sites. What you say may be true for web sites with static pages displaying images and text.—R. Fancsiki

Ah, Medium! Where the opinions of self-entitled dudes flow like rain from the tech heavens.

While they were so busy defending the lack of basic functionality in all the examples that Karolina listed, they failed to notice the most important development:

Let’s build a web that works for everyone. That doesn’t mean everyone has to have the same experience. Let’s accept that there are all sorts of people out there accessing the web with all sorts of browsers on all sorts of devices.

What a fantastic opportunity!

Have you published a response to this? :

Responses

Tom Dale

@adactio This is why I’m so excited about what we’re doing in Ember. FastBoot for JS-less folks, SW for everyone else—out of the box.

# Posted by Tom Dale on Wednesday, May 18th, 2016 at 6:58pm

Jeremy Keith

@tomdale Yes! And I totally agree with you that the “out of the box” part is vital—defaults matter.

Jan Lehnardt

@tomdale @adactio and that’s precisely why I’m excited about Ember. Oh, and I just realised, Ember+Hoodie, because Hoodie should run fine…

20 Shares

# Shared by Conor O'Neill on Wednesday, May 18th, 2016 at 6:58am

# Shared by william j. moner on Wednesday, May 18th, 2016 at 6:31pm

# Shared by JimDabell on Wednesday, May 18th, 2016 at 6:39pm

# Shared by /me npm i dance on Wednesday, May 18th, 2016 at 6:58pm

# Shared by npm i -g styla on Wednesday, May 18th, 2016 at 6:58pm

# Shared by Jan Lehnardt on Wednesday, May 18th, 2016 at 7:10pm

# Shared by Vaidas Lamanauskas on Wednesday, May 18th, 2016 at 7:25pm

# Shared by Carina C. Zona on Wednesday, May 18th, 2016 at 7:30pm

# Shared by Michael Cordover on Wednesday, May 18th, 2016 at 7:47pm

# Shared by Flaki on Wednesday, May 18th, 2016 at 8:03pm

# Shared by ashley williams on Wednesday, May 18th, 2016 at 8:13pm

# Shared by Michael Spellacy on Wednesday, May 18th, 2016 at 8:52pm

# Shared by Sam Stephenson on Wednesday, May 18th, 2016 at 9:54pm

# Shared by Devon Rathie-Wright on Wednesday, May 18th, 2016 at 11:08pm

# Shared by Josh Angell on Wednesday, May 18th, 2016 at 11:40pm

# Shared by Ashley Joost on Thursday, May 19th, 2016 at 1:09am

# Shared by Nick Quaranto on Thursday, May 19th, 2016 at 1:27am

# Shared by Zach Leatherman on Thursday, May 19th, 2016 at 4:15pm

# Shared by Dan Rubin on Friday, May 20th, 2016 at 1:30pm

# Shared by David Foltz on Friday, May 20th, 2016 at 7:27pm

45 Likes

# Liked by Jack Appleby on Tuesday, May 17th, 2016 at 10:52pm

# Liked by elwin schmitz on Tuesday, May 17th, 2016 at 10:52pm

# Liked by Alan Dalton on Tuesday, May 17th, 2016 at 11:54pm

# Liked by dirk döring on Wednesday, May 18th, 2016 at 12:47am

# Liked by Christian Schaefer on Wednesday, May 18th, 2016 at 6:38pm

# Liked by zack on Wednesday, May 18th, 2016 at 6:38pm

# Liked by Ahmad Shadeed on Wednesday, May 18th, 2016 at 6:38pm

# Liked by william j. moner on Wednesday, May 18th, 2016 at 6:38pm

# Liked by JimDabell on Wednesday, May 18th, 2016 at 7:09pm

# Liked by /me npm i dance on Wednesday, May 18th, 2016 at 7:10pm

# Liked by Bastian Albers on Wednesday, May 18th, 2016 at 7:10pm

# Liked by Michael Kühnel on Wednesday, May 18th, 2016 at 7:10pm

# Liked by Martin Splitt on Wednesday, May 18th, 2016 at 7:10pm

# Liked by DJ Sundog on Wednesday, May 18th, 2016 at 7:44pm

# Liked by Alistair Duggin on Wednesday, May 18th, 2016 at 7:44pm

# Liked by Jakub Jo on Wednesday, May 18th, 2016 at 7:44pm

# Liked by ge ricci on Wednesday, May 18th, 2016 at 7:44pm

# Liked by Joschi Kuphal 吉 on Wednesday, May 18th, 2016 at 7:45pm

# Liked by Gunnar Bittersmann on Wednesday, May 18th, 2016 at 8:16pm

# Liked by Heinz Wittenbrink on Wednesday, May 18th, 2016 at 8:16pm

# Liked by Flaki on Wednesday, May 18th, 2016 at 8:16pm

# Liked by ashley williams on Wednesday, May 18th, 2016 at 8:17pm

# Liked by Whisky Yogi on Wednesday, May 18th, 2016 at 8:48pm

# Liked by Cameron Moll on Wednesday, May 18th, 2016 at 9:52pm

# Liked by Ethan Marcotte on Wednesday, May 18th, 2016 at 10:21pm

# Liked by Ulf Walter-Laufs on Wednesday, May 18th, 2016 at 10:52pm

# Liked by Mel Choyce on Thursday, May 19th, 2016 at 12:25am

# Liked by Todd Parker on Thursday, May 19th, 2016 at 12:26am

# Liked by Kyle Bragger on Thursday, May 19th, 2016 at 2:21am

# Liked by Benjamin Lupton on Thursday, May 19th, 2016 at 11:09am

# Liked by nietonfir on Thursday, May 19th, 2016 at 4:02pm

# Liked by Ben Schwarz on Thursday, May 19th, 2016 at 4:29pm

# Liked by Dine | Ariadne Gomes on Thursday, May 19th, 2016 at 5:05pm

# Liked by Harri Hälikkä on Thursday, May 19th, 2016 at 5:33pm

# Liked by Josef Engelfrost on Thursday, May 19th, 2016 at 6:36pm

# Liked by Front-End Front on Thursday, May 19th, 2016 at 7:03pm

# Liked by Front-End Front on Thursday, May 19th, 2016 at 7:15pm

# Liked by Gabor Lenard on Thursday, May 19th, 2016 at 9:07pm

# Liked by Seren D on Thursday, May 19th, 2016 at 11:34pm

# Liked by Andy Bluntish on Friday, May 20th, 2016 at 1:37am

# Liked by Nika Zawila on Friday, May 20th, 2016 at 4:00am

# Liked by Tantek Çelik on Friday, May 20th, 2016 at 4:43am

# Liked by Dan Rubin on Friday, May 20th, 2016 at 2:05pm

# Liked by Jan on Friday, May 20th, 2016 at 3:36pm

# Liked by Skye on Sunday, May 22nd, 2016 at 4:10am

Related posts

Going Offline is online …for free

Read the book I wrote about service workers. It’s all yours.

Making the website for Research By The Sea

Having fun with view transitions and scroll-driven animations.

Progressive disclosure defaults

If you’re going to toggle the display of content with CSS, make sure the more complex selector does the hiding, not the showing.

Media queries with display-mode

I never would’ve known about the `display-mode` media feature if I hadn’t been writing about it.

Of the web

Baldur Bjarnason has written my mind.

Related links

Progressive enhancement brings everyone in - The History of the Web

This is a great history of the idea of progressive enhancement:

It is an idea that has been lasting and enduring for two decades, and will continue.

Tagged with

If Not React, Then What? - Infrequently Noted

Put the kettle on; it’s another epic data-driven screed from Alex. The footnotes on this would be a regular post on any other blog (and yes, even the footnotes have footnotes).

This is a spot-on description of the difference between back-end development and front-end development:

Code that runs on the server can be fully costed. Performance and availability of server-side systems are under the control of the provisioning organisation, and latency can be actively managed by developers and DevOps engineers.

Code that runs on the client, by contrast, is running on The Devil’s Computer. Nothing about the experienced latency, client resources, or even available APIs are under the developer’s control.

Client-side web development is perhaps best conceived of as influence-oriented programming. Once code has left the datacenter, all a web developer can do is send thoughts and prayers.

As a result, an unreasonably effective strategy is to send less code. In practice, this means favouring HTML and CSS over JavaScript, as they degrade gracefully and feature higher compression ratios. Declarative forms generate more functional UI per byte sent. These improvements in resilience and reductions in costs are beneficial in compounding ways over a site’s lifetime.

Tagged with

You can use Web Components without the shadow DOM

So what are the advantages of the Custom Elements API if you’re not going to use the Shadow DOM alongside it?

  1. Obvious Markup
  2. Instantiation is More Consistent
  3. They’re Progressive Enhancement Friendly

Tagged with

JavaScript dos and donts @ Mu-An Chiou

Straightforward smart sensible advice that you can apply to any feature on a website.

Tagged with

Building a robust frontend using progressive enhancement - Service Manual - GOV.UK

Oh, how I wish that every team building for the web would use this sensible approach!

Tagged with

Previously on this day

10 years ago I wrote 100 words 056

Day fifty six.

14 years ago I wrote The sound of song

Sing.

16 years ago I wrote Microformation

Microformats go marching on. Now with more options.

17 years ago I wrote Great escaping

Brighton rocks and/or rolls.

18 years ago I wrote Further reading on the nanotechnology of the semantic web

Docs, books, people and technologies.

19 years ago I wrote The ugly American

Paul Graham…. wankah!

20 years ago I wrote A musical baton

I got back from the States yesterday to find that I’ve been handed musical batons by Andy, Richard and Andrea. If I could juggle, I’d put on a show. Instead, I’m going to pass them on like hot memetic potatoes. Here goes…

22 years ago I wrote Client horror stories

I can relate to these tales of terror from the world of web design.

23 years ago I wrote Even more Attack Of The Clones

Jessica and I went to see Attack of the Clones again today. Here’s my (spoiler-free) review.