Skip to content
All writing

Building reliable web interfaces

Handling pending, success and failure states in web interfaces.

I tend to remember a product through its small moments: whether a form remembers what I typed, whether a button explains what happens next, whether the page still makes sense when a connection slows down. Those details rarely begin as the most exciting part of a project, but they determine how it feels to use.

Work through a complete moment

When building a new interaction, I try to finish one small journey before expanding its scope. For a save action, that includes the pending state, success, failure and retry. The useful unit of work is the moment a person can complete, not the number of components on a screen.

This often changes the data model. If a failed request needs to preserve an unsaved change, the interface must know which state belongs to the server and which belongs to the current session. Naming those states early makes both the code and the experience clearer.

Start with native browser elements

Links, buttons and forms already carry a great deal of useful behaviour. Starting with those elements gives keyboard users and assistive technology a dependable foundation. Custom interaction becomes an addition to that foundation instead of a replacement for it.

I still enjoy expressive visuals and playful movement. They land better when the underlying journey is solid. Before adding another effect, I like to try the page with a keyboard, at a narrow width and with a deliberately slow request. There is usually a worthwhile detail waiting there.