-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
81 lines (69 loc) · 2.8 KB
/
index.html
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Aria form validation</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header>
<div>
<h1>Form validation with aria attributes</h1>
</div>
</header>
<section class="main-wrapper">
<form id="form1" name="form1" method="post">
<section id="main-section">
<h2>Basic Form Fields</h2>
<div id="error-summary">
</div>
<div class="form-item">
<fieldset aria-required="true" aria-invalid="false">
<legend>Which color is your favorite?</legend>
<label><input type="radio" name="color" value="blue"> Blue</label>
<label><input type="radio" name="color" value="orange"> Orange</label>
<label><input type="radio" name="color" value="red"> Red</label>
<label><input type="radio" name="color" value="purple"> Purple</label>
</fieldset>
</div>
<div class="form-item">
<fieldset aria-required="true" aria-invalid="false">
<legend>What is your choice?</legend>
<label><input type="checkbox" name="choices" value="choice1"> Choice 1</label>
<label><input type="checkbox" name="choices" value="choice2"> Choice 2</label>
</fieldset>
</div>
<div class="form-item">
<label for="username">What is your name?</label>
<input type="text" name="username" id="username" aria-required="true" aria-invalid="false" placeholder="Enter your name">
</div>
<div class="form-item">
<label for="select">Select a thing!</label>
<div class="select-wrapper">
<select aria-required="true" aria-invalid="false" id="select">
<option checked="checked" value="-1"> -- Select an Option -- </option>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
</select>
</div>
</div>
<div class="form-item">
<label for="text1">Enter some text maybe?</label>
<input type="text" name="text1" id="text1" aria-required="false" aria-invalid="false" placeholder="Enter some text">
</div>
<div class="form-item">
<label for="story">Tell us a story:</label>
<textarea id="story" aria-required="true" aria-invalid="false" placeholder="Enter your story here"></textarea>
</div>
<a href="javascript:void(0);" class="button" onclick="validateForm()">Submit</a>
</section>
</form>
</section>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</body>
</html>