-
Notifications
You must be signed in to change notification settings - Fork 408
Expand file tree
/
Copy pathindex.html
More file actions
54 lines (42 loc) · 1.15 KB
/
index.html
File metadata and controls
54 lines (42 loc) · 1.15 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>aria-label Example: close button: WCAG 2</title>
<style>
body{
background:#fff;
color:#000;
font:100% / 1.5 sans-serif;
}
button {
border: 1px solid #000;
border-radius: 3px;
box-shadow: 3px 3px 4px rgba(0, 0, 0, .3);
&:hover,
&:focus-visible {
outline: 1px solid #000;
box-shadow: 6px 6px 4px rgba(0, 0, 0, .3);
}
}
dialog {
width: 30%;
height: 20%;
padding: 1rem;
border: 2px solid black;
background-color: #ddd;
}
dialog button {
float: right;
}
</style>
</head>
<body>
<p><button type="button" onclick="document.getElementById('dialog').showModal();">Display the dialog</button></p>
<dialog id="dialog">
This is the content of the dialog.
<button aria-label="Close" onclick="document.getElementById('dialog').close();">×</button>
</dialog>
</body>
</html>