# Feedback

Maps each event that needs a message to one place: a toast, an inline message, a field error, a notification, a dialog or a progress indicator.

* Kind: pattern
* Page: https://design.werklist.com/patterns/feedback
* Version: 2.1.2

## When to use it

* Deciding how to report the result of an action
* Deciding how to report a condition, a failure or an arrival

## When not to use it

* Two messages for one event
* A dialog for an action that can be undone
* A toast for a condition that lasts
* A notification for what is already on screen

## Rules

* The change shows where the reader made it: no message. The change is the confirmation.
* The reader's action changed something out of view, or can be undone: a toast.
* The reader's action did not go through: an error toast, or an error inline message when the page cannot go on.
* A condition of the page or panel the reader is on: an inline message at its top.
* A value the form cannot accept: an error under the field.
* Something happened elsewhere, or someone else did it: a notification.
* An act that cannot be undone needs a decision: a dialog.
* Work is under way: a skeleton, a progress bar or a spinner.
* Interrupt only for a decision.
* Undo before confirm. A reversible action runs at once and offers Undo in a toast. A dialog is kept for what cannot come back.
* One event, one message, one place. When an offer is not sent, you see one error, not also a notification. A message about the work of an open dialog appears inside the dialog.

## Accessibility

* The page keeps one polite live region, present from the moment it loads.
* Toasts, the end of a long task and newly loaded content speak through it once.
* Only an error raised by the reader's action speaks as an alert.
* No message takes focus, except a dialog and the message at the top of a form.

## Content

* The result, in the past tense: 'Candidate archived'
* The condition, then what it means: 'You are offline. Some actions wait until the connection is back.'
* The failure, then the next step: 'The offer was not sent. Try again.'
