Skip to content

Commit c05e4ff

Browse files
committed
add p tags around radio buttom labels to meet 24px touch target spacing requirement for fingers, improves accessibility
1 parent 7605c44 commit c05e4ff

1 file changed

Lines changed: 37 additions & 29 deletions

File tree

Form-Controls/index.html

Lines changed: 37 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,32 @@ <h1>Product Pick</h1>
1717

1818
<!-- requirement: ask for customer's full name -->
1919
<!-- validation: name must be at least 2 characters -->
20-
<label for="name">What’s your full name?</label>
21-
<input
22-
type="text"
23-
id="name"
24-
name="name"
25-
required
26-
minlength="2"
27-
placeholder="e.g. Abel T. Abelson"
28-
/>
20+
<p>
21+
<label for="name">What’s your full name?</label>
22+
<input
23+
type="text"
24+
id="name"
25+
name="name"
26+
required
27+
minlength="2"
28+
placeholder="e.g. Abel T. Abelson"
29+
/>
30+
</p>
31+
32+
2933

3034
<!-- requirement: ask for customer's email address -->
3135
<!-- validation: must match a valid email format -->
32-
<label for="email">Your email address:</label>
33-
<input
34-
type="email"
35-
id="email"
36-
name="email"
37-
required
38-
placeholder="e.g. you@example.com"
39-
/>
36+
<p>
37+
<label for="email">Your email address:</label>
38+
<input
39+
type="email"
40+
id="email"
41+
name="email"
42+
required
43+
placeholder="e.g. you@example.com"
44+
/>
45+
</p>
4046

4147
<!-- requirement: customer must choose one t-shirt colour -->
4248
<!-- validation: limit choice to 3 fixed colour options -->
@@ -49,19 +55,21 @@ <h1>Product Pick</h1>
4955

5056
<!-- requirement: customer must select a t-shirt size -->
5157
<!-- validation: size must be one of 6 defined options -->
52-
<label for="size">Select your size:</label>
53-
<select id="size" name="size" required>
54-
<option value="">-- Choose one --</option>
55-
<option value="XS">Extra Small (XS)</option>
56-
<option value="S">Small (S)</option>
57-
<option value="M">Medium (M)</option>
58-
<option value="L">Large (L)</option>
59-
<option value="XL">Extra Large (XL)</option>
60-
<option value="XXL">Double XL (XXL)</option>
61-
</select>
58+
<p>
59+
<label for="size">Select your size:</label>
60+
<select id="size" name="size" required>
61+
<option value="">-- Choose one --</option>
62+
<option value="XS">Extra Small (XS)</option>
63+
<option value="S">Small (S)</option>
64+
<option value="M">Medium (M)</option>
65+
<option value="L">Large (L)</option>
66+
<option value="XL">Extra Large (XL)</option>
67+
<option value="XXL">Double XL (XXL)</option>
68+
</select>
6269

63-
<!-- requirement: a submit button must be present -->
64-
<button type="submit">Place Order</button>
70+
<!-- requirement: a submit button must be present -->
71+
<button type="submit">Place Order</button>
72+
</p>
6573
</form>
6674
</main>
6775
<footer>

0 commit comments

Comments
 (0)