-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path2020-09-22-technique-advisory.html
396 lines (369 loc) · 21.7 KB
/
2020-09-22-technique-advisory.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
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Prototype: Technique document| W3C WAI</title>
<link rel="stylesheet" href="https://w3.org/WAI/assets/css/style.css?1573220675560713000" />
<link rel="stylesheet" href="https://w3.org/WAI/atag/report-tool/build/bundle.css" />
<link rel="stylesheet" href="styles.css" />
<script type="text/javascript" async="" defer="" src="//www.w3.org/analytics/piwik/piwik.js"></script>
<script defer="" src="/WAI/atag/report-tool/build/bundle.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/prism.min.js"></script>
<link rel="stylesheet" href="/a11y-light.css" />
</head>
<body>
<header id="site-header" class="default-grid with-gap">
<div class="tool-header">
<span class="tool-header-name"><a href="2020-10-13-all.html">WCAG 2.1: Techniques</a></span>
<div class="tool-header-logo">
<a href="http://w3.org/">
<img alt="W3C" src="https://w3.org/WAI/atag/report-tool/images/w3c.svg" width="92" height="44" />
</a>
<a href="http://w3.org/WAI/">
<img alt="Web Accessibility Initiative" src="https://w3.org//WAI/atag/report-tool/images/wai.svg" />
</a>
</div>
</div>
</header>
<main>
<div id="conformance-tool" class="default-grid leftcol">
<!-- app 'renders' here -->
<div style="display: none;" aria-hidden="true" data-svnav-router="0"></div>
<nav class="nav svelte-3wzt7m" aria-label="Steps">
<ul class="svelte-3wzt7m">
<li class="nav__item">
<a href="2020-10-20.html">About Techniques</a>
</li>
<li class="nav__item">
<a href="2020-10-13-all.html">All Techniques</a>
</li>
<li class="nav__item">
<a href="alt-index.html">All WCAG 2 Guidance <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" height="24" width="24">
<path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M14 5C13.4477 5 13 4.55228 13 4C13 3.44772 13.4477 3 14 3H20C20.2652 3 20.5196 3.10536 20.7071 3.29289C20.8946 3.48043 21 3.73478 21 4L21 10C21 10.5523 20.5523 11 20 11C19.4477 11 19 10.5523 19 10L19 6.41422L9.70711 15.7071C9.31658 16.0976 8.68342 16.0976 8.29289 15.7071C7.90237 15.3166 7.90237 14.6834 8.29289 14.2929L17.5858 5H14ZM3 7C3 5.89543 3.89543 5 5 5H10C10.5523 5 11 5.44772 11 6C11 6.55228 10.5523 7 10 7H5V19H17V14C17 13.4477 17.4477 13 18 13C18.5523 13 19 13.4477 19 14V19C19 20.1046 18.1046 21 17 21H5C3.89543 21 3 20.1046 3 19V7Z" fill="#282828"></path>
</svg></a>
</li>
</ul>
</nav>
<section class="app-content svelte-1ecbihu" aria-label="Main content">
<div style="display: none;" aria-hidden="true" data-svnav-route-start="0"></div>
<div style="display: none;" aria-hidden="true" data-svnav-router="1"></div>
<h1 style="max-width: 14em"><span style="display: block; font-size: .5em; margin-bottom: 0.25em;">Technique
G115</span> Using semantic elements to mark up structure</h1>
<section id="description">
<h2>Description</h2>
<p>The objective of this technique is to create lists of related items using list elements appropriate for their purposes. The <code class="el">ol</code> element is used when the list is ordered and the <code class="el">ul</code> element
is used when the list is unordered. Definition lists (<code class="el">dl</code>) are used to group terms with their definitions. Although the use of this markup can make lists more readable, not all lists need markup. For instance,
sentences that contain comma-separated lists may not need list markup.
</p>
<p>When markup is used that visually formats items as a list but does not indicate the list relationship, users may have difficulty in navigating the information. An example of such visual formatting is including asterisks in the content
at the beginning of each list item and using <<code class="el">br</code>> elements to separate the list items.
</p>
<p>Some assistive technologies allow users to navigate from list to list or item to item. Style sheets can be used to change the presentation of the lists while preserving their integrity.
</p>
<p>The list structure (<code class="el">ul</code>/<code class="el">ol</code>) is also useful to group hyperlinks. When this is done, it helps screen reader users to navigate from the first item in a list to the end of the list or jump
to the next list. This helps them to bypass groups of links if they choose to.
</p>
</section>
<section id="examples">
<h2>Examples</h2>
<section class="example" id="example-1-a-list-showing-steps-in-a-sequence-">
<h3>Example 1: A list showing steps in a sequence </h3>
<p>This example uses an ordered list to show the sequence of steps in a process.</p>
<pre xml:space="preserve"><code class="language-markup"> <ol>
<li>Mix eggs and milk in a bowl.</li>
<li>Add salt and pepper.</li>
</ol></code></pre>
</section>
<section class="example" id="example-2-a-grocery-list-">
<h3>Example 2: A grocery list </h3>
<p>This example shows an unordered list of items to buy at the store.</p>
<pre xml:space="preserve"><code class="language-markup"><ul>
<li>Milk</li>
<li>Eggs</li>
<li>Butter</li>
</ul></code></pre>
</section>
<section class="example" id="example-3-a-word-and-its-definition-">
<h3>Example 3: A word and its definition </h3>
<p>This example uses a definition list to group a definition with the term that is being defined.
</p>
<pre xml:space="preserve"><code class="language-markup"><dl>
<dt>blink</dt>
<dd>turn on and off between .5 and 3 times per second
</dd>
</dl> </code></pre>
</section>
<section class="example" id="example-4-contact-information-using-a-definition-list">
<h3>Example 4: Contact information using a definition list</h3>
<p>This example uses a defintion list to mark up pairs of related items. The pairs themselves are a logically related list. Since browsers lack wide support for CSS styling on definition list elements, span elements have been included
in the markup for styling purposes only, and are not required:
</p>
<pre xml:space="preserve"><code class="language-markup"><dl>
<dt><span>name:</span></dt><dd><span>John Doe</span></dd>
<dt><span>tel:</span></dt><dd><span>01-2345678</span></dd>
<dt><span>fax:</span></dt><dd><span>02-3456789</span></dd>
<dt><span>email:</span></dt><dd><span>[email protected]</span></dd>
</dl></code>
</pre>
<p>The following CSS styling can be used to format each paired item in the list on its own line, as well as giving a table-like layout:
</p>
<pre xml:space="preserve"><code class="language-css">dt, dd{float: left;margin: 0;padding: 0;}
dt{clear:both;font-weight: bold}
dt span{display: inline-block; width: 70px;}
dd span{display: inline-block; margin-right: 5px;}</code>
</pre>
<p class="working-example">This is shown in the <a href="../../working-examples/definition-list-contact-info/">working example of Contact information using
a definition list</a>
</p>
</section>
<section class="example" id="example-5-using-lists-to-group-links">
<h3>Example 5: Using lists to group links</h3>
<p>In this example the links are grouped using the <code class="el">ul</code> and <code class="el">li</code> elements.
</p>
<pre xml:space="preserve"><code class="language-markup"><a name="categories" id="categories"></a><h2>Product Categories</h2>
<ul class="navigation">
<li><a href="kitchen.html">Kitchen</a></li>
<li><a href="bedbath.html">Bed &amp; Bath</a></li>
<li><a href="dining.html">Fine Dining</a></li>
<li><a href="lighting.html">Lighting</a></li>
<li><a href="storage.html">Storage</a><li>
</ul> </code></pre>
<p>CSS can be used to style the list elements, so this technique can be used with a variety of visual appearances.
</p>
<p>Here is a style that removes the list bullets and the left padding that creates the indent and flows the individual list elements horizontally.
</p>
<pre xml:space="preserve"><code class="language-css">ul.navigation {
list-style: none;
padding: 0;
}
ul.navigation li {
display: inline;
}</code></pre>
<p>This style removes the list bullets and the left padding and displays the items in a floating block.
</p>
<pre xml:space="preserve"><code class="language-css">ul.navigation {
list-style: none;
padding: 0;
}
ul.navigation li {
display: block;
float: left;
}</code></pre>
</section>
</section>
<section id="tests">
<h2>Tests</h2>
<section class="procedure" id="procedure">
<h3>Procedure</h3>
<ol>
<li>Check that content that has the visual appearance of a list (with or without bullets) is marked as an unordered list.
</li>
<li>Check that content that has the visual appearance of a numbered list is marked as an ordered list.
</li>
<li>Check that content is marked as a definition list when terms and their definitions are presented in the form of a list.
</li>
</ol>
</section>
<section class="results" id="expected-results">
<h3>Expected Results</h3>
<ul>
<li>All the checks above are true.</li>
</ul>
</section>
</section>
</section>
<aside class="your-report svelte-60ir8u your-report--expanded sidebar" tabindex="-1">
<style>
.sidebar ul {
padding: 0;
}
.sidebar li {
margin-left: 1em;
}
</style>
<h2 style="margin-top: 0">About this page</h2>
<p><em>Techniques</em> are examples of ways to meet a WCAG success criterion.</p>
<style>
dd {
margin-left: 0 !important;
}
</style>
<dl>
<dt>Type of technique <span aria-hidden="true" class="more-info__icon"
onclick="alert('explains in tooltip what normative is'); return false">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 450" style="width: 1em">
<path fill="currentColor"
d="M256 344v-40c0-4.5-3.5-8-8-8h-24v-128c0-4.5-3.5-8-8-8h-80c-4.5 0-8 3.5-8 8v40c0 4.5 3.5 8 8 8h24v80h-24c-4.5 0-8 3.5-8 8v40c0 4.5 3.5 8 8 8h112c4.5 0 8-3.5 8-8zM224 120v-40c0-4.5-3.5-8-8-8h-48c-4.5 0-8 3.5-8 8v40c0 4.5 3.5 8 8 8h48c4.5 0 8-3.5 8-8zM384 224c0 106-86 192-192 192s-192-86-192-192 86-192 192-192 192 86 192 192z">
</path>
</svg>
</span></dt>
<dd>Advisory</dd>
<dt>To meet success criterion</dt>
<dd><a href="https://www.w3.org/WAI/WCAG21/quickref/?versions=2.1#info-and-relationships">1.3.1 Info and
relationships</a></dd>
<dt>Related test rules <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 450" style="width: .8em">
<path fill="black"
d="M256 344v-40c0-4.5-3.5-8-8-8h-24v-128c0-4.5-3.5-8-8-8h-80c-4.5 0-8 3.5-8 8v40c0 4.5 3.5 8 8 8h24v80h-24c-4.5 0-8 3.5-8 8v40c0 4.5 3.5 8 8 8h112c4.5 0 8-3.5 8-8zM224 120v-40c0-4.5-3.5-8-8-8h-48c-4.5 0-8 3.5-8 8v40c0 4.5 3.5 8 8 8h48c4.5 0 8-3.5 8-8zM384 224c0 106-86 192-192 192s-192-86-192-192 86-192 192-192 192 86 192 192z">
</path>
</svg></dt>
<dd><a href="2020-07-15-prototype-act.html">HTML page has title</a></dd>
<dt>Related Techniques</dt>
<dd><a href="https://www.w3.org/WAI/WCAG21/Techniques/html/H40">H40: Using description lists</a></dd>
</dl>
<h3>Other sources</h3>
<p style="margin-top: -.5em; margin-bottom: 1.5em;"><em><small>No endorsement implied.</small></em></p>
<ul>
<li>HTML 4.01 <a href="https://www.w3.org/TR/html4/struct/lists.html#h-10.2">Unordered lists (UL), ordered
lists (OL), and list items (LI)</a>
</li>
<li>HTML 4.01 <a href="https://www.w3.org/TR/html4/struct/lists.html#h-10.3">Definition lists: the DL, DT, and
DD elements</a>
</li>
</ul>
</aside>
</div>
</main>
<div class="default-grid">
<aside class="box box-icon box-space-above" id="helpimprove" style="-ms-grid-column: 2; -ms-grid-column-span: 8; grid-column: 2 / 8;">
<header class="box-h box-h-icon box-h-space-above box-h-icon">
<svg focusable="false" aria-hidden="true" class="icon-comments">
<use xlink:href="/WAI/atag/report-tool/images/icons.svg#icon-comments"></use>
</svg>
<h2>Help improve this page</h2>
</header>
<div class="box-i">
<p>
Please share your ideas, suggestions, or comments via e-mail to the publicly-archived list
<a href="mailto:[email protected]?subject=[en]%20Accessibility%20Fundamentals%20Overview">[email protected]</a> or via GitHub.
</p>
<div class="button-group">
<a href="mailto:[email protected]?subject=[en]%20ATAG%20Report%20Tool&body=[put%20comment%20here...]" class="button"><span>E-mail</span></a>
<a href="https://github.com/w3c/wai-atag-report-tool/" class="button"><span>Fork & Edit on
GitHub</span></a><a href="https://github.com/w3c/wai-atag-report-tool/issues/new" class="button"><span>New
GitHub Issue</span></a>
</div>
</div>
<div></div>
</aside>
</div>
<footer id="wai-site-footer" class="page-footer default-grid" aria-label="Page">
<div class="inner" style="-ms-grid-column: 2; -ms-grid-column-span: 8; grid-column: 2 / 8;">
<p><strong>Date:</strong> Published 29 June 2020.</p>
<p>
<strong>Developer and Editor</strong>:
<a href="https://www.w3.org/People/hidde/">Hidde de Vries</a>.
<strong>Project Lead</strong>:
<a href="https://www.w3.org/People/shadi/">Shadi Abou-Zahra</a>.
<strong>Contributors</strong>:
<a href="https://www.w3.org/People/Shawn/">Shawn Lawton Henry</a>, Eric Eggert, Kevin White, and Daniel Montalvo.
<a href="/WAI/atag/report-tool/acknowledgements">Acknowledgements</a> lists additional contributors.
</p>
<p>
Developed by the Education and Outreach Working Group (<a href="http://www.w3.org/WAI/EO/">EOWG</a>) with support from the
<a href="https://www.w3.org/WAI/about/projects/wai-guide/">WAI-Guide</a> project funded by the European Commission (EC) under the Horizon 2020 program (Grant Agreement 822245).
</p>
</div>
</footer>
<footer class="site-footer grid-4q" aria-label="Site">
<div class="q1-start q3-end about">
<div>
<p>
<a class="largelink" href="https://w3.org/WAI/" dir="auto" translate="no" lang="en">W3C Web Accessibility
Initiative (WAI)</a>
</p>
<p>
Strategies, standards, and supporting resources to make the Web accessible to people with disabilities.
</p>
</div>
<div class="social" dir="auto" translate="no" lang="en">
<ul>
<li>
<a href="https://twitter.com/w3c_wai"><svg focusable="false" aria-hidden="true" class="icon-twitter">
<use xlink:href="/WAI/atag/report-tool/images/icons.svg#icon-twitter"></use>
</svg>
Twitter</a>
</li>
<li>
<a href="https://w3.org/WAI/feed.xml"><svg focusable="false" aria-hidden="true" class="icon-rss">
<use xlink:href="/WAI/atag/report-tool/images/icons.svg#icon-rss"></use>
</svg>
Feed</a>
</li>
<li>
<a href="https://www.youtube.com/channel/UCU6ljj3m1fglIPjSjs2DpRA/playlistsv"><svg focusable="false"
aria-hidden="true" class="icon-youtube">
<use xlink:href="/WAI/atag/report-tool/images/icons.svg#icon-youtube"></use>
</svg>
YouTube</a>
</li>
<li>
<a href="https://w3.org/WAI/news/subscribe/" class="button">Get News in Email</a>
</li>
</ul>
</div>
<div dir="auto" translate="no" lang="en">
<p>
Copyright © 2019 W3C <sup>®</sup> (<a href="https://www.csail.mit.edu/"><abbr
title="Massachusetts Institute of Technology">MIT</abbr></a>,
<a href="https://www.ercim.eu/"><abbr
title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="https://www.keio.ac.jp/">Keio</a>,
<a href="https://ev.buaa.edu.cn">Beihang</a>)
<a href="https://w3.org/WAI/about/using-wai-material/">Permission to Use WAI Material</a>.
</p>
</div>
</div>
<div dir="auto" translate="no" class="q4-start q4-end" lang="en">
<ul style="margin-bottom: 0;">
<li>
<a href="https://w3.org/WAI/about/contacting/">Contact WAI</a>
</li>
<li><a href="https://w3.org/WAI/sitemap/">Site Map</a></li>
<li><a href="https://w3.org/WAI/news/">News</a></li>
<li><a href="https://w3.org/WAI/sitemap/#archive">Archive</a></li>
<li>
<a href="https://w3.org/WAI/about/accessibility-statement/">Accessibility Statement</a>
</li>
<li><a href="https://w3.org/WAI/translations/"> Translations</a></li>
<li><a href="https://w3.org/WAI/roles/">Resources for Roles</a></li>
</ul>
</div>
</footer>
<script src="https://unpkg.com/@popperjs/core@2/dist/umd/popper.min.js"></script>
<script src="https://unpkg.com/tippy.js@6/dist/tippy-bundle.umd.js"></script>
<script>
// With the above scripts loaded, you can call `tippy()` with a CSS
// selector and a `content` prop:
var tooltips = document.querySelectorAll('[data-tooltip-content]');
for (i = 0, length = tooltips.length; i < length; i++) {
var contentPointer = tooltips[i].getAttribute('data-tooltip-content');
var content = document.querySelector(contentPointer).innerHTML;
tippy(tooltips[i], {
content: content,
allowHTML: true,
interactive: true,
});
}
</script>
<style>
[data-tooltip-content] {
padding: 0;
background: none;
border: 0;
color: black;
font-size: inherit;
vertical-align: middle;
}
[data-tooltip-content]:hover {
background: none;
color: var(--light-blue);
}
[data-tippy-root] {
padding: 0 2em;
}
dt div {
font-weight: normal;
}
</style>
</body>
</html>