All articles
Article6 min readUpdated

UI edge cases: how to test them in a design system

UI edge cases are the real data the mock-up did not plan for: a three-line title, an empty list, a longer translation, a portrait photo in a landscape frame. The surest way to catch them is to test every component with the worst realistic data before it ships, and the design system is where that test pays off most.

Why it has become urgent

We now produce interfaces faster than we check them. Andrew Chung, CPO of Level Access, made the point in Smashing Magazine ((new tab)) on 17 November 2026, with figures. In the Level Access survey of more than 2,500 professionals, 61% said AI had sped up design, 58% planning and 51% development, but only 30% testing.The same article cites WebAIM, which measured a 10.1% rise in a year in automatically detected errors on the home pages of the top million sites, from 51 to 56.1 per page.

Bar chart: according to the Level Access survey, 61% of professionals say AI sped up design, 58% planning, 51% development and only 30% testing.
Testing is still the step AI has sped up least. Source: Level Access, via Smashing Magazine.

A component generated in a few minutes is often right on the demo data and fragile on everything else. The faster you generate, the more edge cases need testing systematically, not at the mercy of a review.

The edge cases to test on every component

These are the ones I run on components that display content. Most of them come from my crash-test, described below.

Edge caseExamplesWhat to check
Text that is too longThree-line title, double-barrelled name, email address with no spaceWrapping, truncation, alignment of neighbours
Missing textEmpty optional field, missing description, unknown authorNo gap, no orphan separator
Zero, one, manyEmpty list, a single item, two hundred itemsAn empty state that says what to do, a list that stays usable
Translation“Save” turning into “Enregistrer les modifications”The longest language you serve
French typographyNon-breaking spaces, French quotation marksNo lone “?” at the start of a line
Numbers and amountsSeven-figure price, negative value, decimals, thousands separatorFigures aligned in a table
ImagesPortrait in a landscape frame, heavy or missing imageCropping, fallback background, alternative text
Content typed by a humanExtra line breaks, text pasted from a word processor, double spacesA clean result in every case
The edge cases to run on every component that displays content
Worst case : the same card with a missing image, a five-line title, an overflowing address, orphan separators and a button label that is too longDemo : an article card with an image, a short title and a “Save” button
The same card, with demo data then with the worst realistic data. Drag the slider.

The edge cases that are about accessibility

Three WCAG 2.2 level AA success criteria can be tested like edge cases, because they simulate a user who changes the display.

  • Resize text (1.4.4). Text must be resizable up to 200% without loss of content or functionality.
  • Reflow (1.4.10). At a width of 320 CSS pixels, content must stay usable without scrolling both horizontally and vertically. That width matches a 1,280-pixel window zoomed to 400%.
  • Text spacing (1.4.12). Nothing must be lost when the user sets line height to 1.5 times the font size, paragraph spacing to 2 times, letter spacing to 0.12 times and word spacing to 0.16 times.

TipThese criteria overlap with your long-text cases: a title that overflows with a slightly long name will also overflow at 200% zoom. Testing one helps prepare the other, without replacing it.

Where to put these tests in the design system

The right place is the component itself. If the badge holds long text in the library, it stands a good chance of holding it everywhere, provided you test it at the widths it is used at.

  1. In Figma, add a “worst case” board next to each component with the data from the list above. Product teams see at once what the component can take.
  2. In code, write one story per edge case next to the component, and turn it into an automated test. On my site, every Storybook story runs as a test before any release that touches a component.
  3. In the documentation, note what the component does not handle: it is as useful as what it does handle.
  4. In review, keep a human eye on what a tool cannot see. As the Smashing article notes, a dropdown menu can pass automated checks and still be unusable with a keyboard.

What I do on my own components

For my site, I use a crash-test, a skill for my coding agent, which I run on components that display data. It swaps the demo data for the worst realistic cases: long titles, empty fields, a single item, zero items, French text longer than English, French typography, amounts, wrongly shaped images, content typed into the back office. It shows the result behind a “Demo / Worst case” switch visible only in development, and returns a report of what breaks with a fix for each issue.

The checklist

Tick it off on every component that displays content, or copy it into its page.

The worst cases, component by component

0 of 12

Frequently asked questions

Real data the mock-up did not plan for: a three-line title, an empty list, a longer translation, a portrait photo in a landscape frame.

In the design system component, at the widths it is used at: if it holds the worst case in the library, it stands a good chance of holding it everywhere.

Three level AA criteria: resize text (1.4.4), reflow (1.4.10) and text spacing (1.4.12).

Sources

A design system or brand project?

Audit, foundations, components, governance, adoption: let’s talk about what is holding you back.

Book a call (new tab)