Quality user interfaces: components, state, accessibility and well-made empty states

How to build an interface that does not look generated: component architecture, state management, consistency with the design system, accessibility, responsiveness, loading and error states.

Methodologymetodologiafrontendaccessibilitàingegneria del software19 November 2026 · 3 min read

A "generated" interface can be spotted from a distance: inconsistent spacing, colours chosen at random, a button that cannot be reached with the keyboard, an empty list that shows a white page. Building a quality interface does not take more time, it takes deciding a few rules in advance and respecting them.

Component architecture

Each component has one responsibility. Files that change together stay together (the component, its style, its tests). Small, composable components beat giant ones with dozens of options. You separate what displays (presentation) from what decides and fetches data (logic).

State management

State goes where it is needed, no higher. First state local to the component; if two need it, the common parent; only for what half the application needs, shared state. Global state for everything makes every change a risk.

Consistency with the design system

If a design system exists, you use it: components, spacing, typography, colours. If it does not, you define a few values and reuse them. This is where the signs of the "generated" interface show: different margins in every block, three nearly identical shades of grey, decorative effects for no reason. Spacing on a fixed scale; typography with few levels and a clear hierarchy; colour with a meaning (action, error, status) and enough contrast.

Accessibility

The reference is level AA of the WCAG 2.1 guidelines. In practice:

  • Keyboard. Everything that can be done with the mouse can be done with the keyboard, with a sensible tab order and a visible focus.
  • Labels. Every interactive element has a name that is understandable also to a screen reader (labels and ARIA attributes where HTML is not enough).
  • Focus management. When a dialog opens the focus goes in, when it closes the focus returns to where it started.
  • Empty and error states with meaning. An empty list explains why it is empty and what to do; an error says what went wrong and how to fix it, not just "error".

Responsiveness

You start from the smallest format and extend. You try it at several real widths, not just by resizing the window. Touch targets are big enough; content does not run off the screen.

Loading and transitions

Every operation that takes time has a visible state (loading, progress) and a failure one. Transitions help you understand what changed; they do not decorate.

The most common excuses

ExcuseReality
"We'll do accessibility later"Redoing the structure afterwards costs far more than doing it right.
"It works on my screen"On a phone, or with the keyboard, perhaps not.
"Few people see the empty state"Everyone sees it on first access.

An example

An orders table: with no data it shows an empty table with just the headers. Done with care: "No orders yet. When a customer places one, you will see it here" and a button to create a test order. While loading, skeleton rows; on error, "I cannot load the orders. Try again" with the button. All of it reachable by keyboard and with a readable name for every control.

When to use it

When building or changing user-facing interfaces, components, layouts or state management, and when the result has to have the quality of a product, not that of a prototype.

This method derives from the open-source agent-skills family by Addy Osmani (MIT licence), rewritten and adapted.

This article is an OIAR skill

What you have just read is the content of a skill from the OIAR catalogue, written for people. Knowledge like this, but richer and deeper, written for the agents, drives the interviews, the analysis and the report inside the platform. Skills are used in OIAR: to try this one on a project of yours you need an account.

frontend-ui-engineeringA method for building quality user interfaces: small components, state where it is needed, consistency with the design system, AA accessibility, responsiveness, loading, empty and error states. Use it when creating or changing an interface, a component or a layout.