-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex-fixed.html
More file actions
112 lines (99 loc) · 4.5 KB
/
Copy pathindex-fixed.html
File metadata and controls
112 lines (99 loc) · 4.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lumen Swap — Stellar DEX (Fixture, fixed)</title>
<link rel="stylesheet" href="./styles-fixed.css" />
</head>
<body>
<!-- ================================================================
Corrected reference version of index.html — every violation
injected there has been resolved here. Used to generate the
before/after screenshots in the README and to confirm the audit
returns zero findings against a genuinely accessible page.
================================================================ -->
<header class="topbar">
<div class="logo">Lumen Swap</div>
<!-- FIX: image-alt — decorative logo icon marked empty-alt since the
wordmark text next to it already conveys the same info -->
<img src="./assets/stellar-logo.svg" class="logo-icon" alt="" />
<!-- FIX: button-name / color-contrast — accessible name added,
contrast raised to 4.5:1+ -->
<button class="connect-wallet-btn" data-testid="connect-wallet-btn" aria-label="Connect wallet">
<span class="wallet-icon" aria-hidden="true"></span>
</button>
</header>
<main class="swap-panel" data-testid="swap-panel">
<h1 class="panel-title">Swap</h1>
<section class="swap-form">
<!-- FIX: label — real <label for> association, placeholder kept as
supplementary hint only -->
<div class="field-group" data-testid="from-amount-group">
<label for="from-amount" class="field-caption">From</label>
<input
type="number"
id="from-amount"
data-testid="from-amount-input"
placeholder="0.00"
class="amount-input"
/>
<label class="sr-only" for="from-token-select">From token</label>
<select id="from-token-select" class="token-select" data-testid="from-token-select">
<option>XLM</option>
<option>USDC</option>
</select>
</div>
<button class="flip-btn" data-testid="flip-tokens-btn" aria-label="Flip token order">⇅</button>
<div class="field-group" data-testid="to-amount-group">
<label for="to-amount" class="field-caption">To</label>
<input
type="number"
id="to-amount"
data-testid="to-amount-input"
placeholder="0.00"
class="amount-input"
/>
<label class="sr-only" for="to-token-select">To token</label>
<select id="to-token-select" class="token-select" data-testid="to-token-select">
<option>USDC</option>
<option>XLM</option>
</select>
</div>
<!-- FIX: color-contrast — darkened to #5c5c72 on white, ~5.3:1 -->
<p class="rate-hint" data-testid="rate-hint">
Rate updates every 15s based on Soroban AMM pool reserves.
</p>
<!-- FIX: tabindex — removed positive tabindex, relies on natural DOM
order (settings toggle moved before the form in DOM order to
match its visual position, see layout below) -->
<button class="review-swap-btn" data-testid="review-swap-btn">
Review Swap
</button>
</section>
</main>
<!-- FIX: focus-order — settings toggle moved to natural tab order,
tabindex removed -->
<button class="settings-toggle" data-testid="settings-toggle-btn" aria-label="Open settings">
<span class="gear-icon" aria-hidden="true"></span>
</button>
<!-- FIX: keyboard trap — modal now traps focus WHILE open (Tab/Shift+Tab
cycle within it), supports Escape to close, restores focus to the
triggering button on close, and has a real close control. See
app-fixed.js for the focus-trap implementation. -->
<div class="tx-confirm-modal" id="tx-confirm-modal" data-testid="tx-confirm-modal" role="dialog" aria-modal="true" aria-labelledby="tx-confirm-title" aria-hidden="true">
<div class="modal-content">
<h2 id="tx-confirm-title">Confirm Transaction</h2>
<p>You are about to swap tokens via Soroban contract call.</p>
<div class="modal-actions">
<button class="confirm-btn" data-testid="confirm-tx-btn">Confirm</button>
<button class="cancel-btn" data-testid="cancel-tx-btn" aria-label="Cancel and close dialog">Cancel</button>
</div>
</div>
</div>
<footer class="footer" data-testid="footer">
<p>Lumen Swap runs on Stellar Soroban smart contracts.</p>
</footer>
<script src="./app-fixed.js"></script>
</body>
</html>