Skip to content

Commit 27b1d8e

Browse files
Merge pull request #14 from CarsenGafford2/main
Improve form accessibility
2 parents ff8d8d4 + 448043e commit 27b1d8e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

templates/index.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,13 @@ <h2 class="section-title">Find Your Next Project</h2>
260260
id="skills-input"
261261
placeholder="Type a skill and press Enter..."
262262
autocomplete="off"
263+
aria-required="true"
264+
aria-describedby="skills-hint skills-error"
263265
/>
264266
</div>
265267
<!-- Hidden field holds the final comma-separated value -->
266268
<input type="hidden" id="skills" name="skills" />
267-
<span class="form-hint">Or click a popular skill below to add it</span>
269+
<span id="skills-hint" class="form-hint">Or click a popular skill below to add it</span>
268270
<div class="form-error-msg" id="skills-error"></div>
269271
</div>
270272

@@ -285,7 +287,7 @@ <h2 class="section-title">Find Your Next Project</h2>
285287
<div class="form-group">
286288
<label for="level">Experience Level</label>
287289
<div class="select-wrap">
288-
<select id="level" name="level">
290+
<select id="level" name="level" aria-required="true" aria-describedby="level-error">
289291
<option value="" disabled selected>Select level</option>
290292
<option value="Beginner">Beginner</option>
291293
<option value="Intermediate">Intermediate</option>
@@ -298,7 +300,7 @@ <h2 class="section-title">Find Your Next Project</h2>
298300
<div class="form-group">
299301
<label for="interest">Area of Interest</label>
300302
<div class="select-wrap">
301-
<select id="interest" name="interest">
303+
<select id="interest" name="interest" aria-required="true" aria-describedby="interest-error">
302304
<option value="" disabled selected>Select interest</option>
303305
<option value="Web">Web Development</option>
304306
<option value="Data">Data and Analytics</option>
@@ -315,7 +317,7 @@ <h2 class="section-title">Find Your Next Project</h2>
315317
<div class="form-group">
316318
<label for="time">Time Availability</label>
317319
<div class="select-wrap">
318-
<select id="time" name="time">
320+
<select id="time" name="time" aria-required="true" aria-describedby="time-error">
319321
<option value="" disabled selected>How much time can you commit?</option>
320322
<option value="Low">Low — a few hours total</option>
321323
<option value="Medium">Medium — across a weekend</option>

0 commit comments

Comments
 (0)