~/wiki

Confirmation Gate Patterns

Confiance : high
confirmation-gatesux-patternssafety-designdestructive-actionssenior-uxerror-preventionuser-interface-designaccessibilityvoice-interfacestwo-step-confirmation

User interface design patterns for preventing accidental execution of destructive or irreversible actions. Critical for applications targeting elderly users or those with limited digital literacy, where accidental activation of dangerous functions poses significant risks.

Core Concepts

True Blocking vs Display-Only Confirmation

Anti-pattern: Showing confirmation UI but executing actions immediately

  • Displays "Should I go ahead?" but proceeds without waiting for response
  • Creates false sense of safety while providing no actual protection
  • Common in rapid prototyping where UI is implemented before logic

Correct pattern: Actual action blocking with explicit user consent

  • Action execution paused until user provides explicit confirmation
  • Multiple confirmation modalities (voice, click, keyboard)
  • Clear visual indication that action is pending user response

Implementation Strategies

Two-Step Confirmation Process

  1. Initial warning: Clear explanation of what action will occur
  2. Explicit confirmation: User must actively confirm intent to proceed
  3. Cancel prominence: Making cancellation easier than confirmation
  4. Cooling-off period: Brief delay before irreversible actions execute

Voice Interface Confirmation

Special considerations for voice-based confirmation gates:

  • Verbal confirmation: Require spoken "yes" or "confirm" responses
  • Confirmation phrases: Avoid single-word responses prone to false positives
  • Visual backup: Display confirmation state for users with hearing difficulties
  • Timeout handling: Clear behavior when user doesn't respond

Context-Specific Applications

Email and Communication Safety

  • Send prevention: Extra confirmation before sending emails to large groups
  • Attachment verification: Confirm before sending sensitive attachments
  • Reply-all protection: Warning before replying to large distribution lists
  • External recipient alerts: Flag emails going outside trusted contacts

Financial Transaction Safety

  • Amount verification: Confirmation for transactions above thresholds
  • Recipient validation: Extra verification for new or unusual recipients
  • Batch transaction warnings: Special protection for multiple transfers
  • Time-based restrictions: Prevent late-night or impulsive transactions

System-Level Protection

  • File deletion gates: Multi-step confirmation for permanent deletions
  • Settings changes: Protection against accidentally disabling security features
  • Privacy modifications: Confirmation before sharing personal information
  • Account access: Verification before granting new application permissions

Technical Implementation Details

Backend Architecture Patterns

# Anti-pattern: Display confirmation but execute immediately
def plan_step_speak_before(self, action):
    show_confirmation_ui("Should I go ahead?")
    execute_action(action)  # Executes without waiting

# Correct pattern: Block until confirmation received
def plan_step_speak_before(self, action):
    confirmation_id = show_confirmation_ui("Should I go ahead?")
    await wait_for_user_confirmation(confirmation_id)
    if confirmation_received(confirmation_id):
        execute_action(action)

State Management

  • Pending action queues: Store actions awaiting confirmation
  • Confirmation timeouts: Clear expired confirmations automatically
  • Multiple confirmation tracking: Handle multiple simultaneous confirmations
  • Persistence: Maintain confirmation state across application restarts

Senior-Specific Considerations

Cognitive Accessibility

  • Simple language: Avoid technical jargon in confirmation messages
  • Clear consequences: Explain what will happen if user proceeds
  • Visual clarity: High contrast, large text for confirmation dialogs
  • Time allowance: Longer timeout periods for users who need time to process

Physical Accessibility

  • Large confirmation buttons: Accommodate decreased fine motor control
  • Multiple confirmation methods: Voice, click, keyboard shortcuts
  • Error recovery: Clear ways to undo if confirmation was accidental
  • Consistent placement: Confirmation controls in predictable locations

Common Failure Modes

False Security Theatre

  • Confirmation dialogs that train users to click through automatically
  • Too many confirmations that decrease user attention to actual risks
  • Confirmation messages that don't clearly explain consequences
  • Inconsistent confirmation requirements that confuse users

Technical Implementation Bugs

  • Race conditions where actions execute before confirmation logic completes
  • UI state management issues where confirmation state isn't properly tracked
  • Timeout handling that fails to clean up pending actions
  • Cross-platform inconsistencies in confirmation behavior

Testing and Validation

User Testing Approaches

  • Senior user testing: Validation with target demographic
  • Stress testing: Confirmation behavior under various system loads
  • Accessibility testing: Verification with assistive technologies
  • Cross-modal testing: Confirmation via different input methods

Technical Validation

  • Race condition testing: Verify actions don't execute during confirmation display
  • Timeout testing: Confirm proper cleanup of expired confirmations
  • State persistence: Verify confirmation state survives application restarts
  • Error condition handling: Test confirmation behavior when systems fail

See also