-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
71 lines (63 loc) · 2.87 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./style.css">
<title>Accessible Slider</title>
</head>
<body>
<div>
<div class="wrapper">
<h1>Accessible Slider</h1>
<p class="back">
<a href="../../index.html">Back to components list</a>
</p>
<h2>Demo</h2>
<h3>Basic carrousel</h3>
<div class="slider" aria-label="Carrousel d'image" tabindex="0">
<ul class="slider__items">
<li class="slider__item" aria-label="Item 1 of 5">
<img src="https://picsum.photos/400/300?random=1" />
</li>
<li class="slider__item" aria-label="Item 2 of 5">
<img src="https://picsum.photos/400/300?random=2" />
</li>
<li class="slider__item" aria-label="Item 3 of 5">
<img src="https://picsum.photos/400/300?random=3" />
</li>
<li class="slider__item" aria-label="Item 4 of 5">
<img src="https://picsum.photos/400/300?random=4" />
</li>
<li class="slider__item" aria-label="Item 5 of 5">
<img src="https://picsum.photos/400/300?random=5" />
</li>
</ul>
<div class="slider__nav">
<button class="slider__prev">Previous</button>
<button class="slider__next">Next</button>
</div>
<div class="slider__live-region sr-only"><!-- current item will be announced here based on item aria-label --></div>
</div>
</div>
<h2>Code</h2>
<p class="codepen" data-height="600" data-theme-id="light" data-default-tab="html,result" data-slug-hash="GRYEzJo" data-user="beapi" style="height: 600px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;">
<span>See the Pen <a href="https://codepen.io/beapi/pen/GRYEzJo">
Accessible Collapsible Dropdown Listbox</a> by Be API (<a href="https://codepen.io/beapi">@beapi</a>)
on <a href="https://codepen.io">CodePen</a>.</span>
</p>
<script async src="https://cpwebassets.codepen.io/assets/embed/ei.js"></script>
</div>
<script type="module">
import { Slider } from '../../be-a11y.js'
import '../../src/css/index.css'
import './style.css'
Slider.init('.slider', {
maxPrevPos: -2,
maxNextPos: 2,
dots: true
});
</script>
</body>
</html>