
Visual State Coverage: Beyond the Default Render
The sunny-day render is one state among many. How to cover themes, locales, direction, and interaction states without multiplying the suite into unreviewability.
TL;DR: A suite that snapshots only the sunny-day render — light theme, English copy, populated data, no interaction — certifies a state many users never see. Dark-theme contrast breaks, locale-length overflow, RTL mirroring failures, and unstyled empty states all hide outside it. States multiply against surfaces exactly like browser and viewport axes do, so the full state grid is unaffordable by construction. The craft is the deliberate cut: apply each state axis to the surfaces where that state carries distinct rendering risk, cover most states cheaply at the component layer, and write down the states you consciously skip.
The default render is one state among many
The first version of many visual suites captures each surface once, in its most comfortable configuration: light theme, the development locale, a populated data fixture, no interaction in progress. That render is real, but it is one state among many, and for some products it may not be the most common one.
The regression classes that live outside it are specific. Dark-theme contrast that collapses because a token resolved to the wrong value. Layout that overflows when a translated string runs half again as long as the English. Navigation and forms that mirror incorrectly under right-to-left direction. Empty states, error states, and loading skeletons that were never styled because nobody screenshotted them.
The grid problem has to be stated honestly. States multiply against surfaces the same way browser and viewport axes do. Every state axis applied to every covered surface is a product of two growing numbers: for illustration, five state axes across forty covered surfaces is two hundred captures before a single engine or viewport axis is added on top. The full grid — each state on each surface — is out of reach by construction, not by budget. Pretending otherwise leads to one of two outcomes: a suite that costs too much to review and gets rubber-stamped, or a suite that quietly covers only the default render anyway while the state axes exist on paper.
Themes and appearance modes
Dark mode is a parallel rendering of every covered surface. The useful observation about theme regressions is that they cluster rather than scatter: they are usually token-level or cascade-level, so a broken token shows up across every component that consumes it rather than in one isolated place.
That clustering is what makes the efficient cut possible. Full theme coverage belongs at the layer where the tokens resolve — the design-system components — where a single broken value is caught once and stands for all its downstream uses. Spot coverage on a handful of composed pages catches the cases where cascade context changes the outcome. This concentration reasoning is shared with the design-system coverage concern, and it applies here in the same shape.
Forced-colors and high-contrast modes are further appearance axes. For many suites the honest move is to name them as conscious out-of-scope rather than to imply coverage that does not exist — a suite that snapshots light and dark and stops there should say so, so that nobody later assumes forced-colors was covered because "we test themes."
Dark-mode implementation technique — the color-scheme property, the media queries, how the token layer resolves — belongs to its own literature. This concern covers the testing consequence only: given a theme implementation, which surfaces get captured in which themes and why.
Locales and direction
Text length is a layout input. Translation expansion can break truncation, wrapping, and fixed-width assumptions a component made against English copy. Covering the class does not require snapshotting every language — one deliberately long-string locale, or a pseudo-localized fixture that pads and accents the base strings, exercises the expansion risk across the whole suite.
Right-to-left is a different axis, not a longer-string one. RTL is a mirrored layout: the flip is structural, and it deserves its own axis on direction-sensitive surfaces — navigation, forms, anything with directional icons or arrows. A surface that has no directional structure gains little from an RTL capture; a surface built around horizontal flow needs one.
The fixture approach keeps both affordable. Pseudo-locale content stubs drive expansion and direction without a real localization pipeline running inside the test loop. Internationalization implementation is its own engineering domain; this concern observes the rendered consequence and nothing deeper.
Interaction and data states
Interaction states are captured by driving the state before the shot: hover applied, focus moved onto a control, a disclosure opened, an error surfaced. Focus indicators in particular are a visual fact worth pinning on the controls that matter, because a focus ring that silently disappears is a real regression and an easy one to ship unnoticed.
Data states are fixture-driven and component-level by nature. Empty, single-item, overflowing, and loading-skeleton renders are reached by handing the component different data, and the cheapest place to enumerate them is the isolated component render rather than a navigated page where reaching the empty state might mean deleting every record first. The empty state in particular is easy to ship unstyled, because a developer testing with their own populated account may never see it.
Reduced motion sits in two roles at once. A suite that disables all animation for determinism should still deliberately verify the reduced-motion presentation on any surface where the product promises a distinct one — the stabilization default and the user-facing state are not the same thing.
One boundary has to be explicit: accessibility auditing is not what a pixel assertion verifies. Contrast ratios, semantic structure, and screen-reader behavior are outside what a screenshot comparison can check. Pinning a focus indicator is visual coverage of a visual fact; it is not an accessibility claim, and the accessibility discipline owns the auditing.
| State axis | Where it earns coverage | Cheapest layer |
|---|---|---|
| Theme / dark mode | Design-system components (full), a few composed pages (spot) | Component |
| Locale expansion | Surfaces with truncation, wrapping, or fixed widths | Component, via pseudo-locale fixture |
| RTL direction | Direction-sensitive surfaces: nav, forms, directional icons | Component and page |
| Interaction states | Key controls — focus, hover, error, open | Component |
| Data states | Anything rendering a collection or async content | Component, via fixtures |
| Reduced motion | Surfaces with a promised distinct reduced-motion presentation | Page |
Cutting the grid deliberately
The cut is priority-ranked pairs, not a blanket rule. Each state axis is applied to the surfaces where that state has distinct rendering risk and skipped elsewhere — on record, so the skip is a decision rather than an oversight.
Component-level enumeration absorbs most of the state cost cheaply, because variants render directly. Page-level state coverage is reserved for the states that have composition consequences: a dark-theme page where the cascade context differs, an RTL page where the whole layout mirrors.
The documented skip is the discipline that makes the rest safe. States consciously not covered are written down next to the matrix and selection decisions, so the blind spots are chosen and visible rather than discovered later by a user filing a screenshot of a broken RTL layout. "We do not cover error states on marketing pages" is a defensible position; the same gap, undocumented, just looks like the suite missed something.
The honest limit is the same one that constrains every axis: state coverage grows the review surface too. Every new state axis produces diffs someone has to judge, and the rubber-stamp risk that comes with over-selection applies here in full. A state grid large enough to be unreviewable protects little.