-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforms_basic.php
More file actions
64 lines (53 loc) · 2.16 KB
/
forms_basic.php
File metadata and controls
64 lines (53 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
$pageTitle = 'Basic Forms';
include 'includes/header.php';
?>
<h1>Basic Form Issues</h1>
<form>
<h2>3.3.2 Labels or Instructions / 1.1.1 - Missing Labels</h2>
<!-- No label, just text node next to input -->
First Name: <input type="text" name="firstname" />
<br><br>
<h2>3.3.2 Labels or Instructions - Placeholder as Label</h2>
<!-- Only placeholder, no visual label or aria-label -->
<input type="text" placeholder="Last Name" name="lastname" />
<br><br>
<h2>1.3.1 Info and Relationships - Implicit Label Not Wrapped</h2>
<!-- Label tag exists but doesn't wrap input and no 'for' attribute -->
<label>Email Address</label>
<input type="email" name="email" />
<br><br>
<h2>4.1.1 Parsing (Historical) - Duplicate IDs</h2>
<!-- Multiple elements with same ID -->
<label for="phone">Phone:</label>
<input type="text" id="phone" />
<br>
<label for="phone">Cell:</label>
<input type="text" id="phone" />
<br>
<label for="phone">Fax:</label>
<input type="text" id="phone" /> <!-- Triplicate ID -->
<h2>3.3.2 Labels or Instructions - More Missing Labels</h2>
<div>
Field 1: <input type="text" name="f1" />
</div>
<div>
Field 2: <input type="text" name="f2" />
</div>
<div>
Field 3: <input type="text" name="f3" />
</div>
<div>
Field 4: <input type="text" name="f4" />
</div>
<div>
Field 5: <input type="text" name="f5" />
</div>
<h2>3.3.2 Labels or Instructions - More Placeholder Labels</h2>
<input type="text" placeholder="Address 1" name="addr1" /><br>
<input type="text" placeholder="Address 2" name="addr2" /><br>
<input type="text" placeholder="City" name="city_ph" /><br>
<input type="text" placeholder="State" name="state_ph" /><br>
<input type="text" placeholder="Zip" name="zip_ph" /><br>
</form>
<?php include 'includes/footer.php'; ?>