Interaction State
Interaction states describe a control's current condition, such as default, hover, focus, pressed, selected, disabled, loading, or invalid.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/interaction-state/
01What it means
An interaction-state model specifies how a component looks, behaves, and is exposed programmatically as user input and system conditions change. States can coexist: a selected item may also be focused, hovered, or disabled. State is distinct from a temporary transition animation.[1][2]
- Base stateReady, selected, disabled, loading
- Input stateFocused, hovered, pressed, touched
- System responseContent and semantics update
One state can change without clearing every other state
Every relevant state needs behavior, semantics, and visible cues.
02Why it matters
Explicit state models make feedback consistent across design and code, reveal missing edge cases, and help users understand what can be acted on and what changed. They also keep visual appearance aligned with semantic state for assistive technologies.
03When to use it
Define states for every interactive component and any system condition that changes availability, validity, selection, or progress. Keep the model proportional for simple native controls, and document combinations carefully for reusable design-system components.
04How it works
- List user and system events that can change the component's condition.
- Define mutually exclusive states and combinations such as selected plus focused.
- Specify behavior, visible cues, content, semantics, and transitions for each relevant state.
- Avoid disabling controls when an explanation and recoverable action would serve users better.
- Test state changes across keyboard, pointer, touch, assistive technology, errors, latency, and high contrast.
05A practical example
A Save button has default, hover, visible focus, pressed, submitting, success, and error states. During submission it remains labeled, exposes busy status, and prevents duplicate activation; failure restores actionability and connects the error to a recovery step.
06Where it breaks
State matrices grow quickly, and documenting every theoretical combination can obscure the meaningful ones. Visual specifications cannot replace native semantics or behavioral tests, and disabled states often conceal why an action is unavailable.
Common mistakes
- Designing only default and hover states.
- Treating focus, selection, hover, and pressed as interchangeable.
- Communicating state with color alone.
- Showing a visual state that is not exposed programmatically.
07Sources
- Developing a Keyboard InterfaceW3C Web Accessibility Initiative · Technical guidanceDeveloping a Keyboard Interface
- WAI-ARIA 1.2World Wide Web Consortium · StandardWAI-ARIA 1.2