-
Notifications
You must be signed in to change notification settings - Fork 228
/
Copy pathscreen-reader.html
110 lines (103 loc) · 3.63 KB
/
screen-reader.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Screen Reader Accessibility - Web Accessibility Workshop</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<a href="index.html" class="back-link">← Back to Workshop Index</a>
<main>
<h1>Exercise 1: Screen Reader Accessibility</h1>
<p>
In this exercise, you'll learn how to make web content accessible to
screen readers by fixing non-semantic HTML.
</p>
<div class="exercise-content">
<section class="instructions">
<h2>Instructions</h2>
<p>
Below is a website built without semantic HTML. Try navigating it
with a screen reader, then update it to use proper semantic
elements.
</p>
<ol>
<li>Use your screen reader to navigate the example below</li>
<li>Notice how difficult it is to understand the structure</li>
<li>
Update the HTML to use semantic elements like
<code><header></code>, <code><nav></code>,
<code><main></code>, etc.
</li>
<li>Add appropriate ARIA labels where needed</li>
<li>
Test again with your screen reader to verify the improvements
</li>
</ol>
</section>
<section class="example">
<h2>Example to Fix</h2>
<!-- Non-semantic website example -->
<div class="practice-area">
<div class="header">
<span class="title">My Website</span>
</div>
<div class="nav">
<div>Home</div>
<div>About</div>
<div>Contact</div>
</div>
<div class="main-content">
<div class="section">
<span class="big-text">Welcome to our page</span>
<div class="text">Here is some important information.</div>
</div>
<div class="section">
<span class="big-text">Latest Updates</span>
<div class="text">Check out our new features!</div>
</div>
<div class="form-container">
<div class="form-title">Contact Us</div>
<div>
<span>Name:</span>
<input type="text" />
</div>
<div>
<span>Email:</span>
<input type="text" />
</div>
<div>
<span>Message:</span>
<input type="text" />
</div>
<div>
<span>Subscribe to Newsletter</span>
<input type="checkbox" />
</div>
<div>
<div onclick="alert('Form submitted!')" class="submit-button">
Submit Form
</div>
</div>
</div>
</div>
</div>
</section>
<section class="hints">
<h2>Hints</h2>
<ul>
<li>
Replace <code>div</code> elements with appropriate semantic
elements
</li>
<li>Use proper heading hierarchy (h1, h2, etc.)</li>
<li>Add proper form labels and structure</li>
<li>Make navigation links actually clickable</li>
<li>Add appropriate ARIA labels for interactive elements</li>
</ul>
</section>
</div>
</main>
</body>
</html>