# 2.3 Time-Sensitive Operations
DeFi operations must accommodate users who need more time.
## Success Criteria
### 2.3.1 Time-Sensitive Warnings (Level A)
**Requirement**: Users must be warned before initiating any time-sensitive action (auction bids, flash swaps, liquidation thresholds) with clear indication of time constraints.
**Intent**: Users need to know upfront if an action has time pressure so they can prepare.
**Benefits**:
- **Cognitive disabilities**: Time to mentally prepare
- **Motor impairments**: Can position appropriately
- **All users**: Informed decision-making
**Techniques**:
```tsx
<TimeSensitiveAction type="auction">
{/* Warning before starting */}
<div role="alert" className="time-warning">
<WarningIcon aria-hidden="true" />
<p>
<strong>Time-sensitive action:</strong> Once you place a bid,
you'll have 60 seconds to confirm before the auction round ends.
</p>
</div>
<button
onClick={startBidding}
aria-describedby="time-warning"
>
Start Bidding
</button>
</TimeSensitiveAction>
// For swap quotes
<SwapQuote>
<p role="status">
This quote is valid for <time>30 seconds</time>.
After that, you'll need to refresh for a new price.
</p>
</SwapQuote>
```
**Failures**:
- No warning about time limits
- Time pressure only revealed after starting
- Countdown not announced
---
### 2.3.2 Deadline Extensions (Level AA)
**Requirement**: Where technically possible, users can request deadline extensions for auctions, swaps, or other time-bound operations.
**Intent**: Some users simply cannot act fast enough. Extensions provide equity where possible.
**Benefits**:
- **Cognitive disabilities**: More processing time
- **Motor impairments**: More time to navigate
- **Technical issues**: Recover from delays
**Techniques**:
```tsx
<AuctionBid>
<Timer
endTime={auction.endsAt}
onNearEnd={(remaining) => {
if (remaining < 30000 && !extensionRequested) {
showExtensionOption();
}
}}
/>
{showExtension && (
<button
onClick={requestExtension}
aria-label="Request 60-second extension"
>
Need more time?
</button>
)}
</AuctionBid>
// Backend support
async function requestExtension(auctionId: string) {
// Check if user qualifies for extension
// - First-time bidder
// - Accessibility flag in profile
// - Not already extended
if (canExtend(auctionId)) {
await extendAuction(auctionId, 60); // 60 second extension
}
}
```
**Failures**:
- No extension mechanism exists
- Extension requires complex interaction
- Extension not announced to screen readers
---
### 2.3.3 Slippage Warning Time (Level AA)
**Requirement**: When slippage tolerance is exceeded or price impact is high, users must have adequate time to cancel before execution, with clear announcements.
**Intent**: Fast-moving markets can trap users. Warnings need time for response.
**Benefits**:
- **All users**: Protection from unexpected losses
- **Cognitive disabilities**: Time to understand implications
**Techniques**:
```tsx
<SlippageWarning>
{priceImpact > 5 && (
<div
role="alertdialog"
aria-labelledby="slippage-title"
aria-describedby="slippage-desc"
>
<h3 id="slippage-title">High Price Impact Warning</h3>
<p id="slippage-desc">
This trade has a {priceImpact}% price impact.
You may receive significantly less than expected.
</p>
<div className="warning-timer" aria-live="polite">
<p>Review this information. No action needed for 10 seconds.</p>
<Timer seconds={10} onComplete={enableConfirm} />
</div>
<div className="actions">
<button onClick={cancel}>Cancel</button>
<button
onClick={confirm}
disabled={!confirmEnabled}
aria-disabled={!confirmEnabled}
>
{confirmEnabled
? 'I understand, proceed'
: 'Please review (${remainingSeconds}s)'}
</button>
</div>
</div>
)}
</SlippageWarning>
```
**Failures**:
- Immediate execution after warning
- Confirm button immediately available
- Warning not read by screen readers
---
### 2.3.4 Accessibility Mode for Time-Critical Operations (Level AAA)
**Requirement**: Applications offer an accessibility mode that extends or removes time limits for users who need more time.
**Intent**: Some users will always need more time. A dedicated mode acknowledges this.
**Benefits**:
- **All disability types**: Self-selected accommodation
- **Chronic conditions**: Account for variable ability days
**Techniques**:
```tsx
// User preferences
interface AccessibilitySettings {
extendedTimeLimits: boolean;
timeMultiplier: number; // 1.5x, 2x, etc.
autoRefreshQuotes: boolean;
confirmationDelay: number; // seconds before confirm enabled
}
// Apply throughout app
<SwapFlow settings={accessibilitySettings}>
{settings.extendedTimeLimits ? (
<Quote
expiresIn={30 * settings.timeMultiplier}
autoRefresh={settings.autoRefreshQuotes}
/>
) : (
<Quote expiresIn={30} />
)}
</SwapFlow>
// Settings UI
<AccessibilitySettingsPanel>
<fieldset>
<legend>Time-Sensitive Operations</legend>
<label>
<input
type="checkbox"
checked={settings.extendedTimeLimits}
onChange={toggleExtendedTime}
/>
Extended time limits (1.5x standard time)
</label>
<label>
<input
type="checkbox"
checked={settings.autoRefreshQuotes}
onChange={toggleAutoRefresh}
/>
Auto-refresh swap quotes (prevent expiry)
</label>
<label>
Add confirmation delay:
<select value={settings.confirmationDelay}>
<option value="0">None</option>
<option value="5">5 seconds</option>
<option value="10">10 seconds</option>
<option value="30">30 seconds</option>
</select>
</label>
</fieldset>
</AccessibilitySettingsPanel>
```
**Failures**:
- No accessibility mode available
- Settings buried in complex menus
- Mode doesn't apply to all timed operations
---
## Testing Checklist
- [ ] Time constraints warned before action
- [ ] Countdowns are screen reader accessible
- [ ] Extensions available where possible
- [ ] High slippage has review delay
- [ ] Accessibility time settings available
- [ ] Settings persist across sessions
## Related Components
- [Timer.tsx](../../components/Timer.tsx)
- [SlippageWarning.tsx](../../components/SlippageWarning.tsx)
- [AccessibilitySettings.tsx](../../components/AccessibilitySettings.tsx)