-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathentry.html
321 lines (303 loc) · 14 KB
/
entry.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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
---
layout: default
---
<article>
<div class="container">
<h1 class="h-alpha">
{{ page.title | escape }}
</h1>
</div>
<div class="success-criteria-entry container">
<div class="success-criteria" itemscope itemtype="http://schema.org/HowTo">
<h2 class="h-bravo" itemprop="name">
How to test
{% assign firstLetter = page.title | downcase | slice: 0 %}
{% if firstLetter == 'a' or firstLetter== 'e' or firstLetter== 'i' or firstLetter== 'i' or firstLetter== 'u' %}
an
{% else %}
a
{% endif %}
{{ page.title | escape | downcase }}
</h2>
<div class="test-instructions">
{% if page.gherkin-keyboard and page.gherkin-keyboard != "" %}
{% include criteria-tabs.html %}
{% endif %}
{% if page.gherkin-keyboard and page.gherkin-keyboard != "" %}
<div class="gherkin-criteria tab-panel" id="gherkin-panel" tabindex="0" role="region" aria-label="Gherkin story acceptance criteria">
<p class="" itemprop="name">
<strong>Given that</strong> I am on a page with
{% assign firstLetter = page.title | downcase | slice: 0 %}
{% if firstLetter == 'a' or firstLetter== 'e' or firstLetter== 'i' or firstLetter== 'i' or firstLetter== 'u' %}
an
{% else %}
a
{% endif %}
{{ page.title | escape | downcase }}
</p>
<div id="step1" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
<h3 class="h-charlie" itemprop="name">
<step-number>1</step-number> Keyboard for mobile & desktop
</h3>
<ul class="gherkin-list">
{% for action in page.gherkin-keyboard limit:1 %}
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
<div itemprop="text">
<strong>WHEN</strong> I use {{ action.when }}
<strong>I SEE</strong> {{ action.result }}
</div>
</li>
{% endfor %}
{% for action in page.gherkin-keyboard offset:1 %}
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
<div itemprop="text">
<strong class="uppercase">{{ action.first[0] | capitalize }}</strong> when I use {{ action.first[1] }}
<strong>I SEE</strong> {{ action.result }}
</div>
</li>
{% endfor %}
</ul>
</div>
<div id="step2" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
<h3 class="h-charlie" itemprop="name">
<step-number>2</step-number> Desktop screenreader
</h3>
<ul class="gherkin-list">
{% for action in page.gherkin-keyboard limit:1 %}
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
<div itemprop="text">
<strong>WHEN</strong> I use a desktop screenreader (NVDA, JAWS, VoiceOver)
<strong>AND</strong>
{% for action in page.gherkin-keyboard limit:1 %}
I use {{ action.when }}
<ul>
{% for requirement in page.screenreader %}
<li>
<strong>I HEAR</strong>
<span class="lowercase">{{ requirement[1] | escape }}</span>
</li>
{% endfor %}
</ul>
{% endfor %}
</div>
</li>
{% endfor %}
{% for action in page.gherkin-keyboard offset:1 %}
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
<div itemprop="text">
<strong class="uppercase">{{ action.first[0] | capitalize }}</strong> when I use {{ action.first[1] }}
<strong>I HEAR</strong>
<span class="lowercase">{{ action.result }}</span>
</div>
</li>
{% endfor %}
</ul>
</div>
<div id="step3" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
<h3 class="h-charlie" itemprop="name">
<step-number>3</step-number> Mobile screenreader
</h3>
<ul class="gherkin-list">
{% for action in page.gherkin-mobile limit:1 %}
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
<div itemprop="text">
<strong>WHEN</strong> I use a mobile screenreader (Talkback, VoiceOver)
<strong>AND</strong>
{% for action in page.gherkin-mobile limit:1 %}
I {{ action.when }}
<ul>
{% for requirement in page.screenreader %}
<li>
<strong>I HEAR</strong>
<span class="lowercase">{{ requirement[1] | escape }}</span>
</li>
{% endfor %}
</ul>
{% endfor %}
</div>
</li>
{% endfor %}
{% for action in page.gherkin-mobile offset:1 %}
{% if action and action != "" %}
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
<div itemprop="text">
<strong class="uppercase">{{ action.first[0] | capitalize }}</strong> when I {{ action.first[1] }}
<strong>I HEAR</strong> <span class="lowercase">{{ action.result }}</span>
</div>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
{% if page.settings and page.settings != "" %}
<div id="step4" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
<h3 class="h-charlie" itemprop="name">
<step-number>4</step-number> Device settings
</h3>
<ul class="gherkin-list">
{% for requirement in page.settings %}
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
<div itemprop="text">
<strong class="uppercase">When</strong> I use <span class="lowercase">{{ requirement[0] | capitalize }}</span>
<strong>I SEE</strong> <span class="lowercase">{{ requirement[1] | escape }}</span>
</div>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</div>
{% endif %}
<div class="condensed-criteria tab-panel inert" id="condensed-panel" tabindex="0" role="region" aria-label="Condensed testing instructions" {% if page.url contains "native" %}style="display:block;"{% endif %}>
<div id="step1" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
<link itemprop="url" href="{{ site.url }}{{ site.baseurl }}{{ page.url | replace:'index.html',''}}#step1" />
<h3 class="h-charlie" itemprop="name">
<step-number>1 </step-number>Keyboard {% unless page.url contains "native" %} & screen reader{% endunless %} actions
</h3>
<div itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
<table itemprop="text">
<thead>
<tr>
<th scope="col">When I use</th>
<th scope="col">I see/hear</th>
</tr>
</thead>
<tbody>
{% for action in page.keyboard %}
<tr>
<th scope="row">{{ action[0] | capitalize }}</th>
<td>{{ action[1] | escape }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div id="step2" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
<link itemprop="url" href="{{ site.url }}{{ site.baseurl }}{{ page.url | replace:'index.html',''}}#step2" />
<h3 class="h-charlie" itemprop="name">
<step-number>2 </step-number>Mobile screenreader gestures
</h3>
<div itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
<table itemprop="text">
<thead>
<tr>
<th scope="col">When I use</th>
<th scope="col">I hear</th>
</tr>
</thead>
<tbody>
{% for gesture in page.mobile %}
<tr>
<th scope="row">{{ gesture[0] | capitalize }}</th>
<td>{{ gesture[1] | escape }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div id="step3" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
<link itemprop="url" href="{{ site.url }}{{ site.baseurl }}{{ page.url | replace:'index.html',''}}#step3" />
<h3 class="h-charlie" itemprop="name">
<step-number>3 </step-number>Screenreader output for all devices
</h3>
<div itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
<table itemprop="text">
<thead>
<tr>
<th scope="col">Reads</th>
<th scope="col">I hear</th>
</tr>
</thead>
<tbody>
{% for requirement in page.screenreader %}
<tr>
<th scope="row">{{ requirement[0] | capitalize }}</th>
<td>{{ requirement[1] | escape }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% if page.settings and page.settings != "" %}
<div id="step4" itemprop="step" itemscope itemtype="http://schema.org/HowToStep">
<link itemprop="url" href="{{ site.url }}{{ site.baseurl }}{{ page.url | replace:'index.html',''}}#step3" />
<h3 class="h-charlie" itemprop="name">
<step-number>4 </step-number>Device settings
</h3>
<div itemprop="itemListElement" itemscope itemtype="http://schema.org/HowToDirection">
<table itemprop="text">
<thead>
<tr>
<th scope="col">When I use</th>
<th scope="col">I see</th>
</tr>
</thead>
<tbody>
{% for requirement in page.settings %}
<tr>
<th scope="row">{{ requirement[0] | capitalize | escape }}</th>
<td>{{ requirement[1] | capitalize | escape }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
{% endif %}
</div>
{% if page.wcag and page.wcag != "" %}
<div class="condensed-criteria tab-panel inert" id="wcag-panel" tabindex="0" role="region" aria-label="WCAG success criteria" {% if page.url contains "native" %}style="display:block;"{% endif %}>
<p>
{% assign firstLetter = page.title | downcase | slice: 0 %}
{% if firstLetter == 'a' or firstLetter== 'e' or firstLetter== 'i' or firstLetter== 'i' or firstLetter== 'u' %}
An
{% else %}
A
{% endif %}
{{ page.title | escape | downcase }}
must meet these WCAG principles.
</p>
{% assign i = 0 %}
{% for checklist in page.wcag %}
{% assign i = i | plus:1 %}
<h3 class="h-charlie"><step-number>{{ i }}</step-number>{{ checklist.name }} </h3>
{% if checklist.list %}
<ul class="gherkin-list">
{% for list in checklist.list %}
<li>
{{ list.criteria }}
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
</div>
<div class="post-content">
{% for video in site.video-demos limit:1 %}
{% assign path = page.id | replace: page.slug , "" | prepend: '/assets/media/video' | append: video.directory | append: page.slug | append: ".mp4" %}
{% assign file_exists = site.static_files | where: "path", path %}
{% if file_exists.size != 0 %}
<h2 class="h-bravo">
Video examples
</h2>
{% endif %}
{% endfor %}
<media-gallery>
{% for video in site.video-demos %}
{% assign path = page.id | replace: page.slug , "" | prepend: '/assets/media/video' | append: video.directory | append: page.slug | append: ".mp4" %}
{% assign file_exists = site.static_files | where: "path", path %}
{% if file_exists.size != 0 %}
{% include video-player.html filename = path title = video.title %}
{% endif %}
{% endfor %}
</media-gallery>
{{ content }}
</div>
</div>
</article>