Skip to content

Commit de00a67

Browse files
committed
Improve form accessibility in html
1 parent a877cc3 commit de00a67

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

Form-Controls/index.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<h1>Product Pick</h1>
1515
</header>
1616
<main>
17-
<form>
17+
<form action="#">
1818
<div class="field">
1919
<label for="customer_name">Name :</label>
2020
<input
@@ -23,11 +23,18 @@ <h1>Product Pick</h1>
2323
type="text"
2424
id="customer_name"
2525
name="customer_name"
26+
autocomplete="name"
2627
/>
2728
</div>
2829
<div class="field">
2930
<label for="email">Email :</label>
30-
<input required type="email" name="email" id="email" />
31+
<input
32+
required
33+
type="email"
34+
name="email"
35+
id="email"
36+
autocomplete="email"
37+
/>
3138
</div>
3239
<div class="field">
3340
<label for="colour">Colour choice :</label>
@@ -51,7 +58,7 @@ <h1>Product Pick</h1>
5158
</select>
5259
</div>
5360
<div class="submit_field">
54-
<input class="submit_button" type="submit" value="Submit" />
61+
<button class="submit_button" type="submit">Submit</button>
5562
</div>
5663
</form>
5764
</main>

Form-Controls/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ header h1 {
3636
display: flex;
3737
align-items: center;
3838
gap: 10px;
39-
margin-bottom: 5px;
39+
margin-bottom: 10px;
4040
}
4141

4242
label {

0 commit comments

Comments
 (0)