破坏性操作防护交互设计
为产品中的删除等高风险操作制定撤销、回收站和确认规则,并产出对话框文案与无障碍要求。
完整提示词
<context>
Confirmation dialogs on everything teach people to click "OK" without reading, so the one dialog that matters gets dismissed too. The research-backed pattern is to prefer undo for frequent, reversible actions, keep confirmation for rare, severe or irreversible ones, and make the confirmation specific: name the object, state the consequence and who else is affected, and label the button with the verb ("Delete 14 files"), never "OK" or "Yes". Typing the name to confirm is reserved for the most severe cases. Soft delete with a trash and a stated retention period turns most "irreversible" deletions into recoverable ones.
</context>
<task>
<actions>
{{actions}}
</actions>
Design for {{platform}}. If no actions are listed, ask for them and stop.
1. **Decision rules.** Define the rules for this product, using severity (data lost, people affected, money or access involved), reversibility (technically and practically), and frequency. Typical outcome: frequent and reversible gets undo; rare and reversible gets soft delete; irreversible or affecting others gets a specific confirmation; catastrophic (workspace, production data, all members) gets type-to-confirm plus a delay or second channel where justified.
2. **Action matrix.** Apply the rules to every listed action. Flag actions that should be made reversible rather than confirmed.
3. **Confirmation dialogs.** For each action that needs one: title naming the action and object, body stating consequences and who is affected, the destructive button labelled with the verb and count, the safe button, default focus on the safe option, and whether the destructive button is visually marked.
4. **Undo and trash.** Undo toast duration, placement and behaviour if the user navigates away; trash location, retention period, restore and permanent delete; what happens to shared links and references while in trash.
5. **Bulk and cascading actions.** Show the count and a sample, list dependent items that will also be removed, and handle partial failures.
6. **Copy.** Exact text for each dialog, toast and recovery message.
7. **Accessibility.** Confirmation dialogs use alert-dialog semantics, move focus into the dialog (to the safe action for destructive confirmations) and return it to the trigger on close. Undo toasts are announced to screen readers, reachable by keyboard, pause while hovered or focused, and are not the only route back: keep undo or restore available elsewhere (trash, history) so the time limit does not exclude anyone (WCAG 2.2.1 Timing Adjustable). Danger is not signalled by colour alone.
</task>
<constraints>
- Do not recommend a confirmation for every action; justify each confirmation by severity.
- Never claim an action can be undone or restored unless the given information says it technically can; otherwise mark it [confirm with engineering].
- Destructive buttons never say "OK", "Yes" or "Confirm" alone.
- Do not add friction to cancelling, unsubscribing or leaving that is not justified by real data loss; that is a dark pattern.
{{> output/uncertainty}}
</constraints>
<output_format>
## Decision rules
## Action matrix
| Action | Severity | Reversible | Frequency | Safeguard | Reason |
## Confirmation dialogs
## Undo and trash
## Bulk and cascading actions
## Copy
| Surface | Exact text |
## Accessibility
</output_format>可替换内容
- {{actions}}
- {{platform}}
- {{> output/uncertainty}}
- [confirm with engineering]
分类与标签
设计创意、交互设计、产品设计、确认弹窗