-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnavigation-dropdown.html
More file actions
35 lines (27 loc) · 963 Bytes
/
Copy pathnavigation-dropdown.html
File metadata and controls
35 lines (27 loc) · 963 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Navigation dropdown: AccessU Accessible JavaScript</title>
<style>
body { font-family: Arial, sans-serif; margin: 0; padding: 20px; font-size:1.2em;}
</style>
</head>
<body>
<h1>Navigation Dropdown test</h1>
<!-- Create a navigation landmark -->
<!-- Add buttons inside -->
<!-- Add aria-expanded="false" to buttons -->
<!-- Create sub panels -->
<script>
// Add click event to each button
// when clicked toggle the panel class to open
// when panel is open set aria-expanded="true"
// when panel is open next focus should be brought into the panel
// when panel is closed set aria-expanded="false"
// espace key should close the dropdown, return focus to the button that launched it.
// all dropdowns close when another is opened
</script>
</body>
</html>