Sub topic 6
Feedback: telling users what happened
This chapter covers feedback, the system's response to a user's action. It assumes you know basic HTML and CSS, and that you have read the earlier chapters on the interaction loop, conceptual models, affordances, and signifiers. Later chapters cover timing thresholds, modalities, error messages, and accessibility in more detail. Here you build the working model of feedback itself.
What feedback is
Feedback is information the system returns after the user acts. It answers the question "did my action register, and what did it do?" In the interaction loop, feedback is what bridges the gulf of evaluation. The user acts, the system changes, and feedback makes that change visible so the user can compare the result with their goal.
Feedback is different from a signifier. A signifier appears before the action and says what can be done. Feedback appears after the action and says what happened. A raised, filled button is a signifier. The button darkening under the pointer, then a "Saved." message, are feedback.
| Question the user asks | Answered by | Example |
|---|---|---|
| What can I do here? | Signifier | Filled button with a pointer cursor |
| Did the system notice me? | Immediate feedback | Button shows a pressed state |
| What is it doing now? | Progress feedback | "Saving…" with a spinner |
| What was the result? | Outcome feedback | "Saved." or an error message |
| What state is it in now? | Persistent state | A "Saved 10:42" label |
The loop with feedback
A well-designed response has up to three layers:
- Acknowledgment. The system confirms the input arrived. This should be near-instant.
- Progress. If the work takes noticeable time, the system shows that it is working.
- Outcome. The system states the result and, where relevant, the new state.
Missing any layer creates a specific failure. No acknowledgment leads to repeated clicks. No progress leads to abandonment or suspicion that the app froze. No outcome leaves the user unsure whether to trust the result.
Qualities of good feedback
Good feedback has four properties.
- Immediate. The acknowledgment arrives fast enough to feel connected to the action. The next chapter gives numbers.
- Informative. It says something specific. "Done" is weaker than "3 files uploaded."
- Proportional. Its size matches the importance of the action. Toggling a checkbox needs a tiny change. Deleting an account needs a clear confirmation.
- Located. It appears where the user is already looking, close to the control they used.
Proportionality is the property most often violated. Two common errors are on opposite sides:
- Too little. A form submits and the page looks identical. The user clicks again and creates a duplicate order.
- Too much. Every small action triggers a modal dialog that the user must dismiss. Users learn to dismiss all of them without reading, including the ones that matter.
Feedback on controls: states
The simplest feedback is a change in the control itself. A control passes through several states, and each one should look different from the others.
| State | Meaning | Typical cue |
|---|---|---|
| Default | Available, untouched | Fill, border, or shadow |
| Hover | Pointer is over it | Slightly darker fill |
| Focus | Keyboard target | Visible outline |
| Active | Being pressed | Shift down, shadow removed |
| Disabled | Not available now | Muted color, no pointer cursor |
| Pending | Working | Label or spinner change |
The CSS below, from this tutorial's running example, covers the first five states.
.primary {
cursor: pointer;
background: #0b5fff;
color: #fff;
border: 0;
border-radius: 6px;
padding: 0.5rem 1rem;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.primary:hover { background: #0a4fd6; }
.primary:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.primary:active { transform: translateY(1px); box-shadow: none; }
.primary:disabled {
background: #c7ccd4;
color: #555;
cursor: not-allowed;
box-shadow: none;
}Notice which rule does which job. The base rule, with the fill, shadow, and cursor: pointer, is a signifier: it says the element is pressable. The :hover, :focus-visible, :active, and :disabled rules are feedback: they report the element's current relationship to the user's input. The :active rule moves the button down by one pixel and removes the shadow, which mimics a physical press. That small motion is enough to confirm the press registered.
Common errors with control states
- Removing the focus outline. Writing
outline: nonewithout a replacement erases feedback for keyboard users. Use:focus-visiblewith a clear replacement. - Disabled look without explanation. A greyed-out Submit button gives the user no way to learn why. Pair it with text such as "Enter an email address to continue," or keep the button enabled and report the problem on click.
- Hover as the only feedback. Touch screens have no hover. The
:activestate and the outcome message must carry the information. - State changes that are too subtle. A hover change from
#0b5fffto#0b60ffis invisible. Check that states differ visibly in color, shape, or position, and that color is not the only difference.
Feedback on actions: a complete example
Control states acknowledge input. For actions that talk to a server, you also need progress and outcome feedback. The following page implements all three layers.
<button id="save" type="button">Save</button>
<p id="status" role="status"></p>
<script>
const button = document.getElementById("save");
const status = document.getElementById("status");
button.addEventListener("click", async () => {
button.disabled = true;
status.textContent = "Saving…";
try {
const response = await fetch("/api/save", { method: "POST" });
if (!response.ok) throw new Error("HTTP " + response.status);
status.textContent = "Saved.";
} catch (error) {
status.textContent = "Could not save. Check your connection and try again.";
} finally {
button.disabled = false;
}
});
</script>Walk through what happens on a click:
button.disabled = trueacknowledges the input and blocks a second submission. The:disabledstyle shows the change.status.textContent = "Saving…"gives progress feedback in text.- On success, the status becomes "Saved." On failure, it states what failed and what to do next.
- The
finallyblock re-enables the button, so the user is never stuck in a disabled state, whichever branch ran.
The role="status" attribute makes the paragraph a live region. Screen readers announce changes to its text without moving focus. Without it, a screen reader user would hear nothing after pressing Save.
Limits of this example
The example is intentionally small. Real code needs a few more decisions:
- Disabling the button can hide focus. In some browsers, a button that becomes disabled while focused loses keyboard focus. An alternative is to set
aria-disabled="true"and ignore clicks in the handler, which keeps the button focusable. - Stale messages. If the user clicks Save, then edits the form, "Saved." is now false. Clear or update the status when the data changes.
- Repeated identical messages. Setting the same text twice may not trigger a second screen reader announcement. Clearing the text before setting it again is a common workaround.
- Permanence. A status line that vanishes after two seconds can be missed. Keep outcomes for errors visible until the user acts.
Where to put feedback
Location decides whether feedback is seen. Use this order of preference:
- On the control itself. A button label changes to "Saving…" and then "Saved."
- Next to the control or field. An inline message beside the field that caused it.
- In a shared status region. A consistent area, such as a bar at the top, for page-level results.
- In an interruptive dialog. Only for outcomes the user must acknowledge before continuing.
The further feedback is from the user's point of attention, the more likely it is missed. A toast in the far corner of a large monitor, which disappears after three seconds, is easy to overlook, especially for users who read slowly or use magnification.
State feedback versus event feedback
Two kinds of feedback differ in lifetime.
- Event feedback reports that something happened: a toast saying "Message sent." It is brief and passes.
- State feedback reports what is true now: a "Draft saved at 10:42" label, a toggle that stays on, an unread count. It persists and can be checked at any time.
Event feedback alone is fragile. If the user looks away for a moment, the information is gone. For anything the user may need to verify later, such as whether a document is saved, add state feedback as well. A good pattern is a short event message that also updates a persistent state label.
Matching feedback to the conceptual model
Feedback should use the vocabulary and structure of the user's conceptual model. If a user thinks of a note as a "draft" that becomes "published," feedback saying "Record committed to storage" breaks the model. Say "Published" and show the note in the published list. Feedback that contradicts the model leaves a gap in the gulf of evaluation, even when it is technically accurate.
A related failure is feedback that reveals the wrong cause. If a button looks broken because the network failed, but the message says "Invalid input," the user will change the input and fail again.
A quick checklist
For any action on a screen, ask:
- Does the control show that it received the input?
- Is repeated submission blocked or harmless?
- If the work takes time, is there progress feedback?
- Does the outcome say specifically what happened?
- On failure, does it say what to do next?
- Is the resulting state visible afterwards?
- Is the feedback in a place the user is looking, and is it announced to assistive technology?
- Is its strength proportional to the action?
Exercises
Exercise
A checkout page has a "Pay now" button. After clicking, nothing changes for three seconds, then the page shows a receipt. Some users click twice and are charged twice. Which feedback layers are missing, and what would you add?
Show answer
Acknowledgment and progress are missing. Only the outcome exists. Add an immediate acknowledgment by disabling the button (or ignoring further clicks) and showing a pressed or pending state as soon as it is clicked. Add progress feedback such as the label "Processing payment…" with a spinner, and a note not to close the page. Also make the server reject duplicate submissions, because client feedback alone cannot guarantee that. Keep the outcome receipt, and show a clear error with a recovery step if payment fails.
Exercise
In the Save example, a developer removes the if (!response.ok) throw ... line. The server starts returning HTTP 500. What does the user see, why, and which quality of feedback is violated?
Show answer
The user sees "Saved." because fetch resolves normally for HTTP error statuses, so the catch block never runs. The feedback is not informative or accurate: it reports a false outcome. The user believes the data is saved and may leave, losing work.
Exercise
Classify each as a signifier, event feedback, or state feedback: (a) a pointer cursor over a card, (b) a toast reading "Link copied," (c) a "Last synced 10:42" label.
Show answer
(a) Signifier, because it shows before the action that the card can be clicked. (b) Event feedback, because it reports a one-time occurrence and then disappears. (c) State feedback, because it reports a condition that stays true and can be checked at any time.