-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsafari-scroll-snap-voice-over-breaking-issue.html
73 lines (67 loc) · 1.6 KB
/
safari-scroll-snap-voice-over-breaking-issue.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Safari iOS scroll-snap + VoiceOver breaks after browser interface has retracted</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html {
scroll-snap-type: y mandatory;
}
body {
margin: 0;
}
a {
position: fixed;
top: 10px;
left: 10px;
}
img {
position: fixed;
display: block;
width: 100%;
height: 100vh;
object-fit: cover;
z-index: -1;
}
section {
position: relative;
scroll-snap-align: start;
height: 100lvh;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
}
section::after {
content: '';
position: absolute;
bottom: calc(100lvh - 100dvh);
left: 0;
right: 0;
margin-inline: auto;
display: block;
width: 80%;
height: 2px;
background-color: red;
}
</style>
</head>
<body>
<a href="https://nytimes.com">A link</a>
<img src="https://dummyimage.com/810x1080/000/444" alt="Image description 1"/>
<section>
<h2>Section 1</h2>
</section>
<img src="https://dummyimage.com/810x1080/000/444" alt="Image description 2"/>
<section>
<h2>Section 2</h2>
</section>
<section>
<h2>Section 3</h2>
</section>
<section>
<h2>Section 4</h2>
</section>
</body>
</html>