-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo-code-images.html
195 lines (186 loc) · 8.36 KB
/
demo-code-images.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!doctype html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Exemples de codes : les images - Démonstrations en accessibilité - Stratis</title>
<link rel="icon" type="image/gif" href="favicon.ico"/>
<!-- Compressed CSS -->
<link rel="stylesheet" href="css/github.css">
<link rel="stylesheet" href="css/screen.css">
<!-- highlight -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/11.2.0/highlight.min.js"></script>
<script>hljs.highlightAll();</script>
</head>
<body>
<header role="banner">
<h1 id="heading"><a href="#heading">§</a> Exemples de codes : les images</h1>
</header>
<div class="wrap">
<h2 id="alternative-image"><a href="#alternative-image">§</a> Alternative d'image</h2>
<h3 id="alternative-image-informative">Images informatives</h3>
<pre aria-hidden="true"><code><img alt="alternative de l'image 1" src="image.png"/>
<p role="img" aria-label="alternative de l'image 2">|̶̿ ̶̿ ̶̿ ̶̿||͇ ͇ ̿ ̿|̿ ̿ |̶͇̿ ̶͇̿ ͇̿ |̿ ̶̿'╮|̿ \͇||̶̿ ̶̿ ̶̿ ̶̿| ̿ ̿|̿ ̿ |\ ͇ \/|̶͇̿ ̶͇̿ ͇̿ |͇̿ ͇̿ ͇̿ ͇̿)|̶͇̿ ̶͇̿ ͇̿ |͇ ͇ '||̿ V ̿||̶̿ ̶̿ ̶̿ ̶̿||͇̿ ͇̿ ͇̿ ̶͇̿ι|̶͇̿ ̶͇̿ ͇̿ 2</p>
<svg role="img" aria-label="alternative de mon image 3" width="300" height="300" viewBox="0 0 512 512">
<rect x="64.38" y="149.76" width="300" height="300"></rect>
</svg>
</code></pre>
<div class="demo">
<img alt="alternative de l'image 1" src="https://picsum.photos/500/150"/>
<p role="img" aria-label="alternative de l'image 2">|̶̿ ̶̿ ̶̿ ̶̿||͇ ͇ ̿ ̿|̿ ̿ |̶͇̿ ̶͇̿ ͇̿ |̿ ̶̿'╮|̿ \͇||̶̿
̶̿ ̶̿ ̶̿| ̿ ̿|̿ ̿ |\ ͇ \/|̶͇̿ ̶͇̿ ͇̿ |͇̿ ͇̿ ͇̿ ͇̿)|̶͇̿ ̶͇̿ ͇̿ |͇
͇ '||̿ V ̿||̶̿ ̶̿ ̶̿ ̶̿||͇̿ ͇̿ ͇̿ ̶͇̿ι|̶͇̿ ̶͇̿ ͇̿ 2</p>
<svg role="img" aria-label="alternative de mon image 3" width="300" height="300" viewBox="0 0 512 512">
<rect x="0" y="0" width="300" height="300"></rect>
</svg>
</div>
<h3 id="alternative-image-decorative">Images décoratives</h3>
<pre aria-hidden="true"><code><img alt="" src="image.png"/>
<p aria-hidden="true">|̶̿ ̶̿ ̶̿ ̶̿||͇ ͇ ̿ ̿|̿ ̿ |̶͇̿ ̶͇̿ ͇̿ |̿ ̶̿'╮|̿ \͇||̶̿ ̶̿ ̶̿ ̶̿| ̿ ̿|̿ ̿ |\ ͇ \/|̶͇̿ ̶͇̿ ͇̿ |͇̿ ͇̿ ͇̿ ͇̿)|̶͇̿ ̶͇̿ ͇̿ |͇ ͇ '||̿ V ̿||̶̿ ̶̿ ̶̿ ̶̿||͇̿ ͇̿ ͇̿ ̶͇̿ι|̶͇̿ ̶͇̿ ͇̿ 2</p>
<svg aria-hidden="true" width="300" height="300" viewBox="0 0 512 512">
<rect x="64.38" y="149.76" width="300" height="300"></rect>
</svg>
</code></pre>
<div class="demo">
<img alt="" src="https://picsum.photos/500/150"/>
<p aria-hidden="true">|̶̿ ̶̿ ̶̿ ̶̿||͇ ͇ ̿ ̿|̿ ̿ |̶͇̿ ̶͇̿ ͇̿ |̿ ̶̿'╮|̿ \͇||̶̿
̶̿ ̶̿ ̶̿| ̿ ̿|̿ ̿ |\ ͇ \/|̶͇̿ ̶͇̿ ͇̿ |͇̿ ͇̿ ͇̿ ͇̿)|̶͇̿ ̶͇̿ ͇̿ |͇
͇ '||̿ V ̿||̶̿ ̶̿ ̶̿ ̶̿||͇̿ ͇̿ ͇̿ ̶͇̿ι|̶͇̿ ̶͇̿ ͇̿ 2</p>
<svg aria-hidden="true" width="300" height="300" viewBox="0 0 512 512">
<rect x="0" y="0" width="300" height="300"></rect>
</svg>
</div>
</div>
<div class="wrap">
<h2 id="legende-image"><a href="#legend-image">§</a> Légende d'image</h2>
<h3 id="legende-image-html">Avec les balises HTML5</h3>
<pre aria-hidden="true"><code><figure role="figure" aria-label="Copyright 2016 auteur">
<img alt="alternative de l'image" src="https://picsum.photos/200/300"/>
<figcaption>Copyright 2016 auteur</figcaption>
</figure></code></pre>
<div class="demo">
<figure role="figure" aria-label="Copyright 2016 auteur">
<img alt="alternative de l'image" src="https://picsum.photos/200/300"/>
<figcaption>Copyright 2016 auteur</figcaption>
</figure>
</div>
<h3 id="legende-image-aria">Sans les balises HTML5</h3>
<pre aria-hidden="true"><code><div role="figure" aria-labelledby="caption">
<img src="image.png" alt="alternative de l'image">
<p id="caption">Copyright 2016 auteur </p>
</div></code></pre>
<div class="demo">
<div role="figure" aria-labelledby="caption">
<img src="https://picsum.photos/200/300" alt="alternative de l'image">
<p id="caption">Copyright 2016 auteur </p>
</div>
</div>
</div>
<div class="wrap">
<h2 id="image-texte"><a href="#image-texte">§</a> Images texte</h2>
<pre aria-hidden="true"><code><style>
.covid {
background-color: white;
border: 3px solid #00007d;
color: #00007d;
display: block;
padding: 15px;
width: 556px;
}
.covid-heading {
color: #00007d;
font-size: 1.5rem;
font-weight: normal !important;
margin: 0 !important;
text-transform: uppercase;
}
.covid-heading__txt1,
.covid-heading__txt2 {
border: 1px solid #00007d;
display: inline-block;
padding: 0 5px;
}
.covid-heading__txt2 {
background-color: #00007d;
border-color: white;
color: white;
float: right;
}
.covid-txt-group {
margin: 30px 10px;
}
.covid-txt {
color: #00007d;
font-size: 3rem;
font-weight: bold;
line-height: normal;
margin: 0 !important;
}
.covid-txt.--alert {
color: #e1000e;
font-size: 4rem;
}
</style>
<div class="covid">
<h2 class="covid-heading"><span class="covid-heading__txt1">Information</span> <span class="covid-heading__txt2">#COVID19</span></h2>
<div class="covid-txt-group">
<p class="covid-txt">Quand faire un test, quand m'isoler, quand appeler mon médecin...</p>
<p class="covid-txt --alert">Que faire ?</p>
</div>
</div></code></pre>
<style>
.covid {
background-color: white;
border: 3px solid #00007d;
box-sizing: border-box;
color: #00007d;
display: inline-block;
padding: 15px;
}
.covid-heading {
color: #00007d;
font-size: 1.5rem;
font-weight: normal !important;
margin: 0 !important;
text-transform: uppercase;
}
.covid-heading__txt1,
.covid-heading__txt2 {
border: 1px solid #00007d;
display: inline-block;
padding: 0 5px;
}
.covid-heading__txt2 {
background-color: #00007d;
border-color: white;
color: white;
float: right;
}
.covid-txt-group {
margin: 30px 10px;
}
.covid-txt {
color: #00007d;
font-size: 2.9rem;
font-weight: bold;
line-height: normal;
margin: 0 !important;
}
.covid-txt.--alert {
color: #e1000e;
font-size: 4rem;
}
</style>
<div class="covid">
<h2 class="covid-heading"><span class="covid-heading__txt1">Information</span> <span class="covid-heading__txt2">#COVID19</span></h2>
<div class="covid-txt-group">
<p class="covid-txt">Quand faire un test, quand m'isoler,<br> quand appeler mon médecin...</p>
<p class="covid-txt --alert">Que faire ?</p>
</div>
</div>
<img src="images/image-texte.png" style="display:block"
alt="Information COVID19, quand faire un test, quand m'isoler, quand appeler mon médecin... Que faire ?">
</div>
</body>
</html>