Skip to content

Commit cf86d95

Browse files
committed
Fix accessibility issues with form
1 parent a3f586a commit cf86d95

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/App.svelte

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,17 +159,15 @@
159159
oninput={handleDerive}
160160
/>
161161

162-
<button class="info" tabindex="-1">
162+
<button aria-label="Info" class="info" tabindex="-1">
163163
<i
164164
class="ri-information-line"
165165
title="Site is not case-sensitive. “GitHub” equals “github”."
166-
aria-label="Site is not case-sensitive. “GitHub” equals “github”."
167166
></i>
168167
</button>
169168

170169
<label for="cipher">Cipher key:</label>
171170

172-
<!-- Svelte won't allow bind:value when type is dynamic. -->
173171
<input
174172
type={showCipher ? "text" : "password"}
175173
id="cipher"
@@ -182,14 +180,14 @@
182180
/>
183181

184182
<button
183+
aria-label="Show/hide cipher key"
185184
class="toggle"
186185
disabled={!cipher}
187186
onclick={() => (showCipher = !showCipher)}
188187
>
189188
<i
190189
class={showCipher ? "ri-eye-line" : "ri-eye-off-line"}
191190
title="Show/hide cipher key"
192-
aria-label="Show/hide cipher key"
193191
></i>
194192
</button>
195193

@@ -204,14 +202,14 @@
204202
/>
205203

206204
<button
205+
aria-label="Show/hide password"
207206
class="toggle"
208207
disabled={!derivedPassword}
209208
onclick={() => (showDerivedPassword = !showDerivedPassword)}
210209
>
211210
<i
212211
class={showDerivedPassword ? "ri-eye-line" : "ri-eye-off-line"}
213212
title="Show/hide password"
214-
aria-label="Show/hide password"
215213
></i>
216214
</button>
217215

0 commit comments

Comments
 (0)