Skip to content

Commit c503013

Browse files
committed
Feat: Add tool tips to tell user what buttons do
1 parent 938b6d7 commit c503013

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/index.html

+6-5
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,9 @@ <h3>Generate Password(s)</h3>
272272
<form id="generatePasswords"> <!-- open input area for gen pw -->
273273
<div class="row">
274274
<div class="col-8 col-md-6 mb-3">
275-
<!-- Technically the label should be there but it's an audible repeat of span class -->
276-
<!-- <label class="visually-hidden" for="selectAmount">Number of passwords</label> -->
275+
<label class="visually-hidden" for="selectAmount">Number of passwords</label>
277276
<div class="input-group mt-2">
278-
<span class="input-group-text"># of passwords</span>
277+
<span class="input-group-text" aria-hidden="true"># of passwords</span>
279278
<input type="number" min="1" max="10" step="1" value="3" class="form-control" name="selectAmount"
280279
id="selectAmount" aria-describedby="enterNumberOfPasswords" />
281280
</div>
@@ -315,9 +314,11 @@ <h3>Generate Password(s)</h3>
315314
</div>
316315
<div class="card-body">
317316
<section id="password_presentation">
318-
<input type="radio" name="pwdPresentation" value="lst" aria-description="Present passwords in a list" tabindex="0" checked>
317+
<input type="radio" name="pwdPresentation" value="lst" aria-description="Present passwords in a list" tabindex="0" checked data-toggle="tooltip" data-placement="button"
318+
title="List view with indifvidual copy buttons">
319319
<label for="lst" class="bi bi-list-ul" style="margin-left:0.5em;margin-right:1em"></label>
320-
<input type="radio" name="pwdPresentation" value="txt" aria-description="Present passwords as a block of text" tabindex="0">
320+
<input type="radio" name="pwdPresentation" value="txt" aria-description="Present passwords as a block of text" tabindex="0" data-toggle="tooltip" data-placement="button"
321+
title="All passwords selected ready to copy as a group">
321322
<label for="txt" class="bi bi-file-earmark-text" style="margin-left:0.5em;margin-right:1em"></label>
322323
</section>
323324
<ul id="generated_password_lst" style="list-style-type:none;"></ul>

src/web/passwordview.mjs

+3-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ class PasswordView {
152152
htmlPwdList = htmlPwdList.concat(`
153153
<li>
154154
<button id="copyclip_${theIndex}"
155-
class="btn btn-clipboard bi-clipboard"
155+
class="btn btn-clipboard bi-clipboard"
156+
data-toggle="tooltip" data-placement="button"
157+
title="Copy to Clipboard"
156158
aria-label="Copy Password #${theIndex+1}">
157159
</button>
158160
${passAndStats.passwords[theIndex]}

0 commit comments

Comments
 (0)