MoreLesson 166Free preview
Delete Modal
This lesson is part of How To · All levels
Summary
This lesson discusses the confirmation dialog before the user deletes the data. The capital displays the result of the action, the name of the item to be deleted, and the Cancel and Delete options to prevent click errors. The initial focus should be on the safe option, and the delete button is given a clear style as a risky action.
Key points
- Use the confirmation capital for destructive actions that are difficult to override
- Name items to be removed so that the user is confident of their choice
- Put the initial focus on the Cancel button and provide an exit via Escape.
- Once you confirm, delete the data from the DOM or send a request to the server, and then give feedback.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.