Skip to content

Commit 2b6606d

Browse files
Nesting select and option inside the parent label to help with accessibility.
1 parent 6ab6dd5 commit 2b6606d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Form-Controls/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,16 @@ <h1>Product Pick</h1>
3333
</div>
3434
<div>
3535
<br>
36-
<label for="Size">Shirt size</label>
37-
<select for="Size">
36+
<label for="Size">Shirt size
37+
<select id="Size" name="Shirt size">
3838
<option label="XS" value="XS"></option>
3939
<option label="S" value="S"></option>
4040
<option label="M" value="M"></option>
4141
<option label="L" value="L"></option>
4242
<option label="XL" value="XL"></option>
4343
<option label="XXL" value="XXL"></option>
4444
</select>
45+
</label>
4546
</div>
4647
<br>
4748
<button type="submit">Submit</button>

0 commit comments

Comments
 (0)