Sub topic 8
Choosing Visual, Auditory, and Haptic Feedback
Prerequisites
This chapter assumes that you can use web or mobile interfaces, read basic HTML and CSS, and recognize controls such as buttons, fields, labels, and status messages. You should also understand that feedback is the system's response after a user action.
Feedback has more than one channel
A feedback modality is a way the interface communicates a change. The three common modalities are:
- Visual feedback uses color, shape, text, motion, or layout changes.
- Auditory feedback uses sounds, speech, or tones.
- Haptic feedback uses vibration or physical movement.
Each modality has strengths and limits. Visual feedback is precise and easy to review, but users may not be looking at the screen. Sound can attract attention when the user is looking away, but it may be muted or disruptive. Haptics can confirm an action without requiring sight or sound, but they are unavailable on some devices and have limited meaning.
Use modalities together when the action matters or when one channel may fail. Do not make a critical message depend on only one channel.
Choosing the right modality
Start with the user's situation and the importance of the event.
| Situation | Useful primary feedback | Possible supporting feedback |
|---|---|---|
| A button is focused or pressed | Visual state change | Haptic tap on mobile |
| A file finishes uploading | Text and progress indicator | Sound or vibration if the user may leave the screen |
| A destructive action succeeds | Visible confirmation | Short sound or haptic confirmation |
| A validation error occurs | Error text beside the field | Avoid sound as the only cue |
| A device enters a dangerous state | Persistent visual warning | Distinct sound and strong haptic pulse |
Visual feedback
Visual feedback should show both the current state and the result. A pressed button can change position or color. A saving action can show “Saving…” and then “Saved.” A disabled control should look unavailable and should not respond to input.
Do not use color alone. Pair a red border with an error message or icon. Pair a green color with text such as “Payment complete.” Also preserve sufficient contrast and make focus visible for keyboard users.
Auditory feedback
Use sound for events that need attention or happen away from the user's current focus. Keep sounds short and distinguishable. A success tone should not sound like an error tone.
Avoid playing unexpected audio when the page loads. Let the user control volume and provide a mute option when sounds are frequent. Never communicate essential information through sound alone. A user may have hearing loss, may be in a quiet public place, or may have muted the device.
Haptic feedback
Haptic feedback works well for direct manipulation and short confirmations. A brief vibration can confirm that a toggle changed or that a mobile control received a press. A stronger or repeated pattern can signal an error, but repeated vibration quickly becomes annoying.
Treat haptics as optional enhancement. The browser or device may not support vibration, and the user may disable it. Do not repeatedly vibrate during a long operation. Use one meaningful event instead.
Timing and proportionality
Feedback should match the expected duration of the operation:
- For an immediate action, update the control state immediately.
- For an operation lasting about a second or more, show a pending state.
- For a longer operation, show progress when the system can measure it.
- For an unpredictable operation, show ongoing activity and let the user cancel when possible.
- For completion, show a durable result that remains long enough to notice.
The response should also be proportional. A small toggle does not need a loud alarm. A failed payment needs more detail and a recovery path than a failed animation.
A multimodal example
The following example gives visual feedback, announces the result through a status region, and uses vibration when the device supports it. The status text is available to screen readers, so the interface does not depend on color, sound, or vibration.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Multimodal feedback</title>
<style>
button {
cursor: pointer;
background: #0b5fff;
color: white;
border: 0;
border-radius: 6px;
padding: 0.6rem 1rem;
}
button:focus-visible {
outline: 3px solid #ffbf47;
outline-offset: 3px;
}
button:disabled {
background: #9aa3ad;
cursor: wait;
}
#status {
min-height: 1.5rem;
}
</style>
</head>
<body>
<button id="save" type="button">Save</button>
<p id="status" role="status" aria-live="polite"></p>
<script>
const button = document.querySelector("#save");
const status = document.querySelector("#status");
function beep(frequency, duration) {
const AudioContext = window.AudioContext || window.webkitAudioContext;
if (!AudioContext) return;
const context = new AudioContext();
const oscillator = context.createOscillator();
const gain = context.createGain();
oscillator.frequency.value = frequency;
gain.gain.value = 0.05;
oscillator.connect(gain);
gain.connect(context.destination);
oscillator.start();
oscillator.stop(context.currentTime + duration);
}
button.addEventListener("click", () => {
button.disabled = true;
status.textContent = "Saving…";
setTimeout(() => {
button.disabled = false;
status.textContent = "Saved.";
beep(660, 0.12);
if ("vibrate" in navigator) {
navigator.vibrate(40);
}
}, 800);
});
</script>
</body>
</html>The visual state shows that saving is in progress. The status region communicates the result in text. The tone and vibration provide optional confirmation. If either enhancement is unavailable, the text still completes the interaction.
Auditing feedback choices
For each important action, ask:
- What state changes immediately?
- How does the user know that the operation is still running?
- How does the user know it succeeded or failed?
- Can the user understand the result without sight, sound, or vibration?
- Is the intensity appropriate for the event?
- Can the user silence or disable nonessential sound and haptics?
A good design uses multiple channels without making every event noisy. The primary channel should fit the context, while additional channels should improve awareness rather than compensate for unclear text or missing state information.
Exercise
A mobile form shows a red border when submission fails and plays an error sound. The error message appears only at the top of the page. What should you change?
Show answer
Put a specific error message near the relevant field or submission control, announce the error in an accessible status or alert region, and keep the red border paired with text. Treat the sound as optional supporting feedback rather than the only way to notice the failure.