Parts that must work together
A pattern is not a screenshot. It is a reusable decision model that must preserve intent, state, recovery, and accessibility as layouts change.
Decision framework
Questions to answer before choosing UI
Where did the failure occur?
Field, page, account, permission, network, and service failures need different placement and recovery.
What can the person do?
Offer the next safe action: correct, retry, reconnect, request access, return later, or contact support with useful context.
What work can be preserved?
Keep entered values, selections, scroll position, and draft state whenever possible. State clearly if anything was not saved.
End-to-end accessibility
- Identify errors in text
- Associate field errors with their controls
- Announce async failures without unexpectedly moving focus
- Keep recovery actions keyboard accessible
- Use headings and summaries to make multiple errors scannable
Failure patterns to test
Something went wrong with no next step
Clearing user input
Showing a toast for an error that needs action
Exposing internal error codes without explanation
Retry loops with no alternate route