Skip to content

Commit 2f52bef

Browse files
Refactor form.html for better structure and accessibility
Updated the form structure and improved accessibility features.
1 parent 1c49440 commit 2f52bef

1 file changed

Lines changed: 13 additions & 26 deletions

File tree

tsa-site/form.html

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33

44
<head>
@@ -7,13 +7,11 @@
77
<title>Williamsburg Resource Hub</title>
88
<link rel="icon" type="image/x-icon" href="https://www.google.com/s2/favicons?sz=16&domain_url=https://tsaweb.org">
99
<link rel="stylesheet" href="tsa.css">
10-
1110
</head>
1211

1312
<body>
1413
<a class="skip-to-content" href="#main-content">Skip to content</a>
1514
<header>
16-
<a href="index.html"></a>
1715
<h1>
1816
<a href="index.html">Welcome to the Williamsburg Resource Hub!</a>
1917
</h1>
@@ -27,19 +25,17 @@ <h1>
2725
</ul>
2826
</nav>
2927
<main id="main-content">
30-
<title>
31-
<p>Williamsburg Resource Hub</p>
32-
</title>
3328
<form action="example.php" method="post">
3429
<fieldset>
30+
<legend></legend>
3531
<p>
3632
<label for="name">Name of resource*</label>
37-
<input type="text" id="name" name="name" required />
33+
<input type="text" id="name" name="name" required>
3834
</p>
3935

4036
<p>
4137
<label for="type">Type*</label>
42-
<select id="type" name="type" required="">
38+
<select id="type" name="type" required>
4339
<option value="">Choose...</option>
4440
<option value="Non-profit">Non-profit</option>
4541
<option value="Support">Support</option>
@@ -50,22 +46,20 @@ <h1>
5046
<option value="School">School</option>
5147
<option value="Event">Event</option>
5248
</select>
49+
</p>
5350

5451
<p>
5552
<label for="phone">Phone number*</label>
56-
<input type="text" id="phone" name="phone" placeholder="(123) 456-7890" required pattern="(?:([+][0-9]{1,4})[- ]?)?(?:[(]([0-9]{1,3})[)][- ]?)?([0-9]{1,4})[- ]?([0-9]{1,4})[- ]?([0-9]{1,9})" />
53+
<input type="text" id="phone" name="phone" placeholder="(123) 456-7890" required pattern="(?:([+][0-9]{1,4})[- ]?)?(?:[(]([0-9]{1,3})[)][- ]?)?([0-9]{1,4})[- ]?([0-9]{1,4})[- ]?([0-9]{1,9})">
5754
</p>
58-
5955
<p>
6056
<label for="email">Email*</label>
61-
<input type="email" id="email" name="email" required />
57+
<input type="email" id="email" name="email" required>
6258
</p>
63-
6459
<p>
6560
<label for="bdate">Birthdate</label>
66-
<input type="date" id="bdate" name="bdate" />
61+
<input type="date" id="bdate" name="bdate">
6762
</p>
68-
6963
<p>
7064
<label for="referrer">How did you hear about us?</label><br>
7165
<select multiple id="referrer" name="referrer">
@@ -75,36 +69,29 @@ <h1>
7569
<option value="Other">Other</option>
7670
</select>
7771
</p>
78-
7972
<p>
8073
Would you recommend this site to others? <br>
8174
<label for="recommendYes" class="radio">Yes</label>
8275
<input type="radio" id="recommendYes" name="recommend">
8376
<label for="recommendNo" class="radio">No</label>
8477
<input type="radio" id="recommendNo" name="recommend">
8578
</p>
86-
8779
<p>
8880
<label for="comments">Questions/Comments</label>
8981
<br>
9082
<textarea id="comments" name="comments" rows="5" cols="50"></textarea>
9183
</p>
92-
93-
<p>
84+
9485
<label for="submit"></label>
95-
<input id="submit" type="submit" name="submit" value="Submit">
96-
</p>
97-
98-
<p>
86+
<button id="submit" type="submit" name="submit">Submit</button>
9987
<label for="reset"></label>
100-
<input id="reset" type="reset" value="Cancel">
101-
</p>
88+
<button id="reset" type="reset">Reset</button>
10289
</fieldset>
10390
</form>
104-
10591
</main>
10692
<footer>
107-
<p>This page was made as a project for TSA's 2025 "Webmaster" theme.
93+
<p>
94+
This page was made as a project for TSA's 2025 "Webmaster" theme.
10895
</p>
10996
</footer>
11097
</body>

0 commit comments

Comments
 (0)