-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
463 lines (418 loc) · 18.9 KB
/
index.html
File metadata and controls
463 lines (418 loc) · 18.9 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="assets/css/reset.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="assets/css/hamburger.css">
<link rel="stylesheet" href="assets/css/sidenav.css">
<link rel="stylesheet" href="assets/css/style.css">
<title>Accessible Forms</title>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
<link href="https://fonts.googleapis.com/css?family=Cabin|Monserrat|Forum|Gothic+A1|Raleway" rel="stylesheet">
<script
src="https://code.jquery.com/jquery-3.3.1.js"
integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<link rel="icon" href="https://res.cloudinary.com/dn4jhnh54/image/upload/ar_16:9,c_scale,h_212/v1537732914/aaron-logo1_qxqqek_jifqns.png">
<link rel="stylesheet" href="assets/css/aria.css">
<script type="text/javascript" src="assets/js/app.js"></script>
<script type="text/javascript" src="assets/js/section2.js"></script>
<script type="text/javascript" src="assets/js/section3.js"></script>
</head>
</head>
<body data-spy="scroll" data-target="#myScrollspy" data-offset="140">
<nav class="sidenav" id="myScrollspy">
<div class="closebtn-container">
<a href="javascript:void(0)" class="closebtn">×</a>
</div>
<ul class="nav nav-pills flex-column">
<div class="row justify-content-left ml-1">
<div>
<a class="ex-link" href="https://www.beaccessible.com" aria-label="Be Accessible website"><i class="fas fa-home phone-icon" aria-hidden="true"></i></a>
</div>
<div>
<a class="ex-link" href="https://www.linkedin.com/company/be-accessible-inc" aria-label="Be Accessible LinkedIn"><i class="fab fa-linkedin phone-icon" aria-hidden="true"></i></a>
</div>
<div>
<a class="ex-link" href="https://www.github.com/beaccessible/forms" aria-label=""><i class="fab fa-github phone-icon" aria-hidden="true"></i></a>
</div>
</div>
<li>
<a class="nav-link" href="#intro">Intro</a>
</li>
<div class="tick" aria-hidden="true"></div>
<div class="tick mid" aria-hidden="true"></div>
<div class="tick" aria-hidden="true"></div>
<li>
<a class="nav-link" href="#section1">1. Display Helper Text</a>
</li>
<div class="tick" aria-hidden="true"></div>
<div class="tick mid" aria-hidden="true"></div>
<div class="tick" aria-hidden="true"></div>
<li>
<a class="nav-link" href="#section2">2. Dynamic Validation</a>
</li>
<div class="tick" aria-hidden="true"></div>
<div class="tick mid" aria-hidden="true"></div>
<div class="tick" aria-hidden="true"></div>
<li>
<a class="nav-link" href="#section3">3. Enhance Inputs</a>
</li>
<div class="tick" aria-hidden="true"></div>
<div class="tick mid" aria-hidden="true"></div>
<div class="tick" aria-hidden="true"></div>
<li>
<a class="nav-link" href="#section4">4. HTML > PDF</a>
</li>
<div class="tick" aria-hidden="true"></div>
<div class="tick mid" aria-hidden="true"></div>
<div class="tick" aria-hidden="true"></div>
<li>
<a class="nav-link" href="#section5">5. Update!</a>
</li>
<div class="tick" aria-hidden="true"></div>
<div class="tick mid" aria-hidden="true"></div>
<div class="tick" aria-hidden="true"></div>
<li>
<a class="nav-link" href="#section6">Accessibility Statement </a>
</li>
</ul>
</nav>
<main id="main">
<button class="hamburger hamburger--arrow is-active" type="button" id="menu-btn" title="Close Menu" aria-label="Toggle Navigation" aria-expanded="true" aria-controls="sidenav">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</button>
<section>
<div class="container main">
<div class="row justify-content-center">
<p id="intro">A Guide to Accessible Forms</p>
</div>
<div class="jumbotron intro-container">
<p class="intro-text">The internet is an institution, touching every part of our lives
from shopping to ordering food to booking medical appointments. These interactions live in <a href="https://www.w3schools.com/html/html_form_elements.asp" class="intro-link">forms</a>, an HTML element for receiving
input from a website's user.</p>
<p class="intro-text">Similar to how store locations must have a ramp, forms
must follow particular design steps to support users that might not be able to hold a mouse or view a screen. These users
rely on assistive tech such as screen readers, which organize and read aloud information on the page.
</p>
<p class="intro-text">When websites support these users, you realize benefits for all users. By contrasting accessibility
best practices with brittle and unintuitive user interactions, the difference is clear.
</p>
<p class="intro-text">While these exercises provide a starting point for building accessible forms,
online accessibility is best achieved through the <a href="https://www.beaccessible.com/about-us" class="intro-link">Be Accessible Three Step Process:</a>
</p>
<div>
</div>
<div class="row">
<div class="col-sm step">
<i class="fas fa-laptop fa-w-20 fa-5x flip"></i>
<p class="describer">Automated Audit</p>
</div>
<div class="col-sm step">
<i class="fas fa-hand-paper fa-w-20 fa-5x flip"></i>
<p class="describer">Manual Testing</p>
</div>
<div class="col-sm step">
<i class="fas fa-user-friends fa-w-20 fa-5x flip"></i>
<p class="describer"s>Usability Lab</p>
</div>
</div>
<p class="intro-text" id="last">This is open source! In the sidebar, there are links to the repo--a guide for
designers and developers.
</p>
</div>
<div class="scroll">
<div class="scroll-down" id="topper">
<a class="scroll-arrow" href="#section1" aria-label="Scroll to Section 1"><span></span>scroll</a>
</div>
</div>
</div>
</section>
<!--
Section 1
-->
<section>
<div class="container main">
<div class="section-header">
<h2 id="section1" tabindex="-1">Display Clear Instructions</h2>
</div>
<div class="row no-gutters form-area">
<div class="col col-md-5 flex-column good">
<div class="good-header">
<h3>Do</h3>
</div>
<div class="form-container">
<form>
<div class="example1">
<label for="enrollment" aria-describedby="enrollment-description">Enrollment ID</label>
</div>
<input type="text" id="enrollment" class="form-control form-input extra-reduced">
<p id="enrollment-description" class="extra-description">8 digit code on the test booklet cover</p>
<button type="submit" name="button" value="Submit" disabled>Score Your Test!</button>
</form>
</div>
</div>
<div class="col col-md-5 flex-column bad">
<div class="bad-header">
<h3>Don't</h3>
</div>
<div class="form-container">
<form name="signup" id="signup">
<div class="example1">
<label for="enrollment2" id="enrollment-info2">Enrollment ID</label>
<i class="fas fa-question-circle" data-toggle="tooltip" data-placement="top" title="8 digit code on the test booklet cover" id="enrollment-info"></i>
</div>
<input type="text" id="enrollment2" class="form-control form-input extra-reduced">
<button type="submit" name="button" value="Submit" disabled>Enter</button>
</form>
</div>
</div>
</div>
<div class="container">
<p class="explainer-text">The do form displays the additional instructions for the input.
This helper text doesn't compel the user to another action--hovering over the tooltip. The
do form features a clear call to action--the button clearly the states the action initiated
by submitting the form rather than a vague message such as Enter or Submit.</p>
</div>
</div>
<div class="scroll">
<div class="scroll-down">
<a class="scroll-arrow" href="#section2" aria-label="Scroll to Section 2"><span></span>scroll</a>
</div>
</div>
</section>
<!--
Section 2
-->
<section>
<div class="container main">
<div class="section-header">
<h2 id="section2" tabindex="-1">Dynamic Form Feedback</h2>
</div>
<div class="row no-gutters form-area">
<div class="col col-md-5 flex-column good">
<div class="good-header">
<h3>Do</h3>
</div>
<div class="form-container">
<form id="dynamic-do-form" autocomplete="off">
<div class="input-container">
<label for="email-address1">Email Address</label>
<input type="text" id="email-address1" class="form-control form-input reduced"/>
<p class="feedback" id="sec2-do-email-errors1" aria-live="polite"></p>
</div>
<div class="input-container">
<label for="password1">Password</label>
<input type="password" id="password1" class="form-control form-input extra-reduced" />
<p class="feedback" id="sec2-do-pw-errors1" aria-live="polite"></p>
</div>
<button type="submit" name="button" value="Submit">Create Account!</button>
</form>
</div>
</div>
<div class="col col-md-5 flex-column bad">
<div class="bad-header">
<h3>Don't</h3>
</div>
<div class="form-container">
<form id="dynamic-dont-form" autocomplete="off">
<div id="brittle-errors" tabindex="-1"></div>
<div class="input-container">
<label for="email-address2">Email Address</label>
<input type="text" id="email-address2" class="form-control form-input reduced paddy"/>
</div>
<div class="input-container">
<label for="password1">Password</label>
<input type="password" id="password2" class="form-control form-input extra-reduced paddy" />
</div>
<button type="submit" name="button" value="Submit">Submit</button>
</form>
</div>
</div>
</div>
<div class="container">
<p class="explainer-text">Before permitting the user to submit the form, use JavaScript to dynamically
validate input and provide feedback. This saves the user a page reload. Do form features error messages
that are more descriptive and using ARIA, notifies screen reader users of any changes in form feedback.
</p>
</div>
</div>
<div class="scroll">
<div class="scroll-down">
<a class="scroll-arrow" href="#section3" aria-label="Scroll to Section 3"><span></span>Scroll</a>
</div>
</div>
</section>
<!--
Section 3
-->
<section>
<div class="container main">
<div class="section-header">
<h2 id="section3" tabindex="-1">Progressive Enhancement + Smarter Inputs</h2>
</div>
<div class="row no-gutters form-area">
<div class="col col-md-5 flex-column good">
<div class="good-header">
<h3>Do</h3>
</div>
<div class="form-container">
<form>
<label for="currency">Enter Donation</label>
<div class="input-group extra-reduced paddy">
<div class="input-group-prepend">
<span class="input-group-text">$</span>
</div>
<input type="text" id="currency" class="form-control" placeholder="15.00">
</div>
<label for="phone">Phone Number</label>
<div class="input-group mod-reduced paddy">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-phone phone-icon" aria-hidden="true"></i></span>
</div>
<input type="tel" id="phone" class="form-control" placeholder="(555) 555-5555">
</div>
</form>
</div>
</div>
<div class="col col-md-5 flex-column bad">
<div class="bad-header">
<h3>Don't</h3>
</div>
<div class="form-container">
<form>
<label for="currency2">Enter Donation</label>
<div class="input-group extra-reduced paddy">
<div class="input-group-prepend">
<span class="input-group-text">$</span>
</div>
<input type="text" id="currency2" class="form-control" placeholder="15.00">
</div>
<label for="phone2">Phone Number</label>
<div class="input-group mod-reduced paddy">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-phone phone-icon" aria-hidden="true"></i></span>
</div>
<input type="tel" id="phone2" class="form-control" placeholder="(555) 555-5555">
</div>
</form>
</div>
</div>
</div>
<div class="container">
<p class="explainer-text">Progressive enhancement are layers of enhancement built on top of the core
functionality of the UI element. In Do form, we limit the user from entering non-numerical input
except decimals or hyphens, or entering invalid dollar figures (such as more than 2 decimal points).
After a user leaves a field, we manicure the user input, presenting it more comprehensibly.</p>
</div>
</div>
<div class="scroll">
<div class="scroll-down">
<a class="scroll-arrow" href="#section4" aria-label="Scroll to Section 4"><span></span>Scroll</a>
</div>
</div>
</section>
<!--
Section 4
-->
<section>
<div class="container main">
<div class="section-header">
<h2 id="section4" tabindex="-1">Use HTML rather than PDF</h2>
</div>
<div class="row no-gutters form-area">
<div class="col col-md-5 flex-column good">
<div class="good-header">
<h3>Do</h3>
</div>
<div class="form-container">
<form>
<label class="my-1 mr-2" for="select-health-plan">Select Health Insurance Plan Type</label>
<div class="input-group mod-reduced paddy">
<select class="custom-select my-1 mr-sm-2" id="select-health-plan">
<option selected>Choose...</option>
<option value="1">HMO</option>
<option value="2">PPO</option>
<option value="3">EPO</option>
<option value="4">HDHP</option>
</select>
</div>
<div class="input-group paddy">
<button class="small-btn" type="submit">Book Appointment</button>
</div>
<div>
<a href="info.html" target="_blank"><i class="fas fa-external-link-square-alt phone-icon" aria-hidden="true"></i> Important Health Insurance Info</a>
</div>
</form>
</div>
</div>
<div class="col col-md-5 flex-column bad">
<div class="bad-header">
<h3>Don't</h3>
</div>
<div class="form-container">
<form>
<label class="my-1 mr-2" for="insurance" aria-describedby="insurer-info">Enter Health Insurance Plan Type</label>
<div class="paddy">
<input type="text" id="insurance" class="form-control form-input uber-reduced">
<p class="extra-description" id="insurer-info">Permitted: HMO, PPO, EPO, HDHP</p>
</div>
<div class="input-group paddy">
<button class="small-btn" type="submit">Book Appointment</button>
</div>
<div>
<a href="https://beaccessible.github.io/forms/assets/demo.pdf" download="health-insurer-info">
<i class="fas fa-file-download phone-icon" aria-hidden="true"></i>
Download Insurance Info
</a>
</div>
</form>
</div>
</div>
</div>
<div class="container">
<p class="explainer-text">PDF make assumptions. It requires the user to download a file from the website.
Then the user must actually have software to read the PDF, which can't be assumed especially on mobile.
Plus, a PDF made accessible at a low level will still be far less accessible than HTML. Unless a PDF
is correctly formatted, screen readers will treat the document as a long run-on sentence.
When user has limited options, use a dropdown or radio buttons!</p>
</div>
</div>
<div class="scroll">
<div class="scroll-down">
<a class="scroll-arrow" href="#section5" aria-label="Scroll to Section 5"><span></span>Scroll</a>
</div>
</div>
</section>
<!--
Section 5
-->
<section>
<div class="container main">
<div class="section-header">
<h2 id="section5" tabindex="-1">Accessibility Statement</h2>
</div>
<div class="jumbotron">
<p class="lead">
Be Accessible helps organizations build accessible sites that support all users, including those with disabilities, reducing legal risk and helping make a better internet.
</p>
<hr class="my-4" aria-hidden="true">
<p>We care about accessibility. We believe that users should have an expectation that they'll be use to whatever website they visit. </p>
<p>Providing this access requires a feedback loop and iterative design and development process.</p>
<p>We've designed this guide to comply with WCAG 2.1 AA and be accessible to all users especially those using screen readers.</p>
<p>We're not perfect though but we're always improving. If you have trouble navigating the site or have questions about any of our code samples,
reach out to <a href="mailto:aaron@beaccessible.com">our developers</a>.
</p>
</div>
</section>
</main>
</body>
<script src="https://www.gstatic.com/firebasejs/5.5.9/firebase.js"></script>
<script type="text/javascript" src="assets/js/relationships.js"></script>
</html>