forked from loogart/canada-ca-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathredacted-en.html
executable file
·341 lines (332 loc) · 34.1 KB
/
redacted-en.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
<!DOCTYPE html><!--[if lt IE 9]><html class="no-js lt-ie9" lang="en" dir="ltr"><![endif]--><!--[if gt IE 8]><!-->
<html class="no-js" lang="en" dir="ltr">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<!-- Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html -->
<title>Redacted text - Canada.ca
</title>
<meta content="width=device-width,initial-scale=1" name="viewport">
<meta name="description" content="Guidance on how to code redacted text.">
<!--[if gte IE 9 | !IE ]><!-->
<link href="./GCWeb/assets/favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<link rel="stylesheet" href="./GCWeb/css/theme.min.css">
<!--<![endif]-->
<!--[if lt IE 9]>
<link href="./GCWeb/assets/favicon.ico" rel="shortcut icon" />
<link rel="stylesheet" href="./GCWeb/css/ie8-theme.min.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="./wet-boew/js/ie8-wet-boew.min.js"></script>
<![endif]-->
<!--[if lte IE 9]>
<![endif]-->
<noscript><link rel="stylesheet" href="./wet-boew/css/noscript.min.css" /></noscript>
</head>
<body vocab="http://schema.org/" typeof="WebPage">
<nav>
<ul id="wb-tphp">
<li class="wb-slc">
<a class="wb-sl" href="#wb-cont">Skip to main content</a>
</li>
<li class="wb-slc">
<a class="wb-sl" href="#wb-info">Skip to "About government"</a>
</li>
</ul>
</nav>
<header>
<div id="wb-bnr" class="container">
<section id="wb-lng" class="text-right">
<h2 class="wb-inv">Language selection</h2>
<ul class="list-inline margin-bottom-none">
<li><a lang="fr" href="redacted-fr.html">Français</a></li>
</ul>
</section>
<div class="row">
<div class="brand col-xs-5 col-md-4" property="publisher" typeof="GovernmentOrganization">
<a href="https://www.canada.ca/en.html" property="url"><img src="./GCWeb/assets/sig-blk-en.svg" alt="" property="logo"><span class="wb-inv" property="name"> Government of Canada / <span lang="fr">Gouvernement du Canada</span></span></a>
<meta property="areaServed" typeof="Country" content="Canada">
<link property="logo" href="./GCWeb/assets/wmms-blk.svg">
</div>
<section id="wb-srch" class="col-lg-8 text-right">
<h2>Search</h2>
<form action="#" method="post" name="cse-search-box" role="search" class="form-inline">
<div class="form-group">
<label for="wb-srch-q" class="wb-inv">Search Canada.ca</label>
<input id="wb-srch-q" list="wb-srch-q-ac" class="wb-srch-q form-control" name="q" type="search" value="" size="34" maxlength="170" placeholder="Search Canada.ca">
<datalist id="wb-srch-q-ac">
</datalist>
</div>
<div class="form-group submit">
<button type="submit" id="wb-srch-sub" class="btn btn-primary btn-small" name="wb-srch-sub"><span class="glyphicon-search glyphicon"></span><span class="wb-inv">Search</span></button>
</div>
</form>
</section>
</div>
</div>
<nav class="gcweb-menu" typeof="SiteNavigationElement">
<div class="container">
<h2 class="wb-inv">Menu</h2>
<button type="button" aria-haspopup="true" aria-expanded="false"><span class="wb-inv">Main </span>Menu <span class="expicon glyphicon glyphicon-chevron-down"></span></button>
<ul role="menu" aria-orientation="vertical" data-ajax-replace="./ajax/sitemenu-v5-en.html">
<li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/jobs.html">Jobs and the workplace</a></li>
<li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/immigration-citizenship.html">Immigration and citizenship</a></li>
<li role="presentation"><a role="menuitem" href="https://travel.gc.ca/">Travel and tourism</a></li>
<li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/business.html">Business and industry</a></li>
<li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/benefits.html">Benefits</a></li>
<li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/health.html">Health</a></li>
<li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/taxes.html">Taxes</a></li>
<li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/environment.html">Environment and natural resources</a></li>
<li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/defence.html">National security and defence</a></li>
<li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/culture.html">Culture, history and sport</a></li>
<li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/policing.html">Policing, justice and emergencies</a></li>
<li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/transport.html">Transport and infrastructure</a></li>
<li role="presentation"><a role="menuitem" href="http://international.gc.ca/world-monde/index.aspx?lang=eng">Canada and the world</a></li>
<li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/finance.html">Money and finances</a></li>
<li role="presentation"><a role="menuitem" href="https://www.canada.ca/en/services/finance.html">Science and innovation</a></li>
</ul>
</div>
</nav>
<nav id="wb-bc" property="breadcrumb">
<h2>You are here:</h2>
<div class="container">
<ol class="breadcrumb">
<li><a href="index-en.html">GCWeb home</a></li>
</ol>
</div>
</nav>
</header>
<main property="mainContentOfPage" class="container" typeof="WebPageElement">
<h1 property="name" id="wb-cont">Redacted text</h1>
<div class="wb-prettify all-pre"></div>
<p>Guidance on how to code redacted text.</p>
<ul>
<li><strong>Version:</strong> 1.0.1</li>
<li><strong>Expert:</strong> @duboisp</li>
<li><strong>Last updated:</strong> 2019-03-26</li>
<li><strong>History:</strong>
<ul>
<li>(2019-03-26) Changed the redacted character for "Full block" (U+2588)</li>
<li>(2018-12-13) Initial draft</li>
</ul>
</li>
</ul>
<h2>Background</h2>
<p>Redacted text is a sub-section, often inline, of published content that are obfuscated and unreadable. For some case, the number of redacted character is included and visually represented.</p>
<h2>Recommendation</h2>
<p>Make the redacted text to be sementically understood as an image and apply text alternatives techniques to ensure conformance with the web accessibility standard.</p>
<p>This technique leverage WAI-ARIA.</p>
<h3>Technical specification</h3>
<ul>
<li>Use always the same character for obfuscation in your pages.</li>
<li>
<p>We recommend to use the <strong>Full block</strong> as your obfuscated character.</p>
<ul>
<li>Name: Full block</li>
<li>Symbol: █</li>
<li>HTML Entity: &#9608;</li>
<li>Unicode: U+2588</li>
</ul>
</li>
<li>Make the redacted text need to be in its own container. like: <code><span></span></code></li>
<li>Add the attribute <code>role="img"</code> to the redacted text container.</li>
<li>Add the attribute <code>aria-label="Redacted text"</code> and modify the label accordingly to your context of use. Its content should be enough descriptive to conform at the text alternative WCAG success criteria (SC 1.1.1)</li>
<li>Add CSS class <code>.redacted</code> for an inline redacted text.</li>
</ul>
<p>Notes:</p>
<dl>
<dt>Number of redacted character (Full block U+2528) repeated.</dt>
<dd>There no such requirement because we transform the redacted content into an image. Usually the number of repeated full block character would be the same as the number of redacted character. In some cases it can makes sense to repeat the full block character to represent the width taken by latin character considering the width on one latin character is approximativly half the width of the full block character.</dd>
<dt>Note: Text alternative (<code>aria-label</code>)</dt>
<dd>The label can be fully adapted to your context. In the redacted text context, it can makes sense to include an indication the following is redacted content (<span lang="fr">contenu caviardé</span>) and in some situation to include the number of redacted characters or redacted paragraph.</dd>
<dt>Redacted section (Multiple consecutive paragraph)</dt>
<dd>The whole section should be made as one big image. The semantic need to be removed for all elements which provide some semantic, like paragraph (<code><p></code>) by setting their aria role to presentation (<code>role=presentation</code>)</dd>
</dl>
<h3>Example</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation <span role="img" aria-label="20 redacted characters">████████████████████</span> ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat <span class="redacted" role="img" aria-label="455 redacted characters">███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</span> cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id<span role="img" aria-label="1 redacted character">█</span> est laborum.</p>
<p class="redacted" role="img" aria-label="Redacted paragraph of 460 characters">████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</p>
<p><span class="redacted" role="img" aria-label="460 redacted characters">████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</span></p>
<div role="img" aria-label="Redacted section of 2 paragraphs">
<p class="redacted" role="presentation">████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</p>
<p class="redacted" role="presentation">████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</p>
</div>
<table class="table table-bordered">
<tr>
<th>Column 1</th>
<th>Column 2</th>
</tr>
<tr>
<td>
<p>5. <span class="redacted" role="img" aria-label="460 redacted characters">████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</span></p>
</td>
<td>Empty column 2</td>
</tr>
</table>
<h4>Source Code</h4>
<pre><code><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation <span role="img" aria-label="20 redacted characters">████████████████████</span> ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat <span class="redacted" role="img" aria-label="455 redacted characters">███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</span> cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id<span role="img" aria-label="1 redacted character">█</span> est laborum.</p>
<p class="redacted" role="img" aria-label="Redacted paragraph of 460 characters">████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</p>
<p><span class="redacted" role="img" aria-label="460 redacted characters">████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</span></p>
<div role="img" aria-label="Redacted section of 2 paragraphs">
<p class="redacted" role="presentation">████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</p>
<p class="redacted" role="presentation">████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</p>
</div>
<table class="table table-bordered">
<tr>
<th>Column 1</th>
<th>Column 2</th>
</tr>
<tr>
<td>
<p>5. <span class="redacted" role="img" aria-label="460 redacted characters">████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████</span></p>
</td>
<td>Empty column 2</td>
</tr>
</table></code></pre>
<h2>API</h2>
<p>CSS Class</p>
<dl class="dl-horizontal">
<dt><code>redacted</code></dt>
<dd>Style the consecutive obfuscated characters to don't overflow outside the container of the phrasing content and they start immediatly after the previous non-redacted character.</dd>
</dl>
<h2>References</h2>
<ul>
<li><a href="https://www.w3.org/TR/WCAG21/#text-alternatives">WCAG 2.1 Guideline 1.1 Text Alternatives</a></li>
<li><a href="https://www.w3.org/TR/wai-aria-1.1/#img">WAI-ARIA 1.1 <code>img</code> (role)</a></li>
<li><a href="https://www.w3.org/TR/wai-aria-1.1/#aria-label">WAI-ARIA 1.1 <code>aria-label</code> (property)</a></li>
</ul>
<h2>Version notes</h2>
<dl>
<dt>v1.0.1</dt>
<dd>
<p>The recommendation to use the redacted character "Dark shade" (U+2593) are changed for "Full block" (U+2588).</p>
<p><strong>Migration instruction:</strong> Change the "Dark shade" character in your document for the "Full block" character</p>
<p><strong>WCAG note:</strong> None</p>
<p><strong>Rational:</strong> We received feedback saying the dark shade was not visually pleasant. Also the use of the full block on printed document is much more common than the dark shade character.</p>
<p><strong>Feedback (for v1.0)</strong> The consensus feedback from employees in a small office was the "it hurts the eyes" or "it is headache inducing".</p>
</dd>
<dt>v1.0</dt>
<dd>Released on: 2018-12-13 and packaged with GCWeb 5.0</dd>
</dl>
<div class="pagedetails">
<div class="row">
<div class="col-sm-6 col-md-5 col-lg-4">
<details class="brdr-0">
<summary class="btn btn-default text-center">Report a problem on this page</summary>
<div class="well row">
<div class="gc-rprt-prblm">
<div class="gc-rprt-prblm-frm gc-rprt-prblm-tggl">
<form action="#">
<fieldset>
<legend><span class="field-name">Please select all that apply: </span></legend>
<div class="checkbox">
<label for="problem1"><input type="checkbox" data-reveal="#broken" name="problem" value="Something is broken" id="problem1">Something is broken</label>
</div>
<div class="form-group hide" id="broken">
<label for="problem1-detail">Provide more details (optional):</label>
<input type="text" class="form-control full-width" id="problem1-detail">
</div>
<div class="checkbox">
<label for="problem2"><input type="checkbox" data-reveal="#spelling" name="problem" value="It has spelling or grammar mistakes" id="problem2">The page has spelling or grammar mistakes</label>
</div>
<div class="form-group hide" id="spelling">
<label for="problem2-detail">Provide more details (optional):</label>
<input type="text" class="form-control full-width" id="problem2-detail">
</div>
<div class="checkbox">
<label for="problem3"><input type="checkbox" data-reveal="#wrong" name="problem" value="The information is wrong" id="problem3">The information is wrong</label>
</div>
<div class="form-group hide" id="wrong">
<label for="problem3-detail">Provide more details (optional):</label>
<input type="text" class="form-control full-width" id="problem3-detail">
</div>
<div class="checkbox">
<label for="problem4"><input type="checkbox" data-reveal="#outdated" name="problem" value="The information is outdated" id="problem4">The information is outdated</label>
</div>
<div class="form-group hide" id="outdated">
<label for="problem4-detail">Provide more details (optional):</label>
<input type="text" class="form-control full-width" id="problem4-detail">
</div>
<div class="checkbox">
<label for="problem5"><input type="checkbox" data-reveal="#find" name="problem" value="I can’t find what I’m looking for" id="problem5">I can’t find what I’m looking for</label>
</div>
<div class="form-group hide" id="find">
<label for="problem5-detail">Describe what you’re looking for (optional):</label>
<input type="text" class="form-control full-width" id="problem5-detail">
</div>
<div class="checkbox">
<label for="problem6"><input type="checkbox" data-reveal="#confusing" name="problem" value="It’s confusing" id="problem6">Other</label>
</div>
<div class="form-group hide" id="confusing">
<label for="problem6-detail">Provide more details (optional):</label>
<input type="text" class="form-control full-width" id="problem6-detail">
</div>
</fieldset>
<button type="submit" class="btn btn-primary wb-toggle" data-toggle='{"stateOff": "hide", "stateOn": "show", "selector": ".gc-rprt-prblm-tggl"}'>Submit</button>
</form>
</div>
<div class="gc-rprt-prblm-thnk gc-rprt-prblm-tggl hide">
<h3>Thank you for your help!</h3>
<p>You will not receive a reply. For enquiries, please <a href="https://www.canada.ca/en/contact.html">contact us</a>.</p>
</div>
</div>
</div>
</details>
</div>
</div>
<dl id="wb-dtmd">
<dt>Date modified: </dt>
<dd><time property="dateModified">2019-03-26</time></dd>
</dl>
</div>
</main>
<footer id="wb-info">
<div class="landscape">
<nav class="container wb-navcurr">
<h2 class="wb-inv">About government</h2>
<ul class="list-unstyled colcount-sm-2 colcount-md-3">
<li><a href="https://www.canada.ca/en/contact.html">Contact us</a></li>
<li><a href="https://www.canada.ca/en/government/dept.html">Departments and agencies</a></li>
<li><a href="https://www.canada.ca/en/government/publicservice.html">Public service and military</a></li>
<li><a href="https://www.canada.ca/en/news.html">News</a></li>
<li><a href="https://www.canada.ca/en/government/system/laws.html">Treaties, laws and regulations</a></li>
<li><a href="https://www.canada.ca/en/transparency/reporting.html">Government-wide reporting</a></li>
<li><a href="https://pm.gc.ca/eng">Prime Minister</a></li>
<li><a href="https://www.canada.ca/en/government/system.html">How government works</a></li>
<li><a href="https://open.canada.ca/en/">Open government</a></li>
</ul>
</nav>
</div>
<div class="brand">
<div class="container">
<div class="row">
<nav class="col-md-9 col-lg-10 ftr-urlt-lnk">
<h2 class="wb-inv">About this site</h2>
<ul>
<li><a href="https://www.canada.ca/en/social.html">Social media</a></li>
<li><a href="https://www.canada.ca/en/mobile.html">Mobile applications</a></li>
<li><a href="https://www1.canada.ca/en/newsite.html">About Canada.ca</a></li>
<li><a href="https://www.canada.ca/en/transparency/terms.html">Terms and conditions</a></li>
<li><a href="https://www.canada.ca/en/transparency/privacy.html">Privacy</a></li>
</ul>
</nav>
<div class="col-xs-6 visible-sm visible-xs tofpg">
<a href="#wb-cont">Top of Page <span class="glyphicon glyphicon-chevron-up"></span></a>
</div>
<div class="col-xs-6 col-md-3 col-lg-2 text-right">
<img src="./GCWeb/assets/wmms-blk.svg" alt="Symbol of the Government of Canada">
</div>
</div>
</div>
</div>
</footer>
<!--[if gte IE 9 | !IE ]><!-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.js"></script>
<script src="./wet-boew/js/wet-boew.min.js"></script>
<!--<![endif]-->
<!--[if lt IE 9]>
<script src="./wet-boew/js/ie8-wet-boew2.min.js"></script>
<![endif]-->
<script src="./GCWeb/js/theme.min.js"></script>
</body>
</html>