@surea11y/pack-raweb 0.0.0-stage → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,70 @@
1
1
  {
2
2
  "name": "@surea11y/pack-raweb",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.1.0",
4
+ "description": "RAWeb 1.1, Luxembourg's Web Accessibility Assessment Framework, as a pack for @surea11y/core: its criteria and tests, one result per criterion and the raweb-1.1 profile, built on @surea11y/pack-rgaa.",
5
+ "keywords": [
6
+ "accessibility",
7
+ "a11y",
8
+ "accessibility-testing",
9
+ "raweb",
10
+ "luxembourg",
11
+ "rgaa",
12
+ "en301549",
13
+ "wcag",
14
+ "surea11y",
15
+ "surea11y-pack"
16
+ ],
17
+ "license": "MPL-2.0 AND LicenseRef-CC-BY-3.0-LU",
18
+ "author": "Jorge Rumoroso",
19
+ "homepage": "https://github.com/SureA11y/pack-raweb#readme",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/SureA11y/pack-raweb.git"
23
+ },
24
+ "bugs": {
25
+ "url": "https://github.com/SureA11y/pack-raweb/issues"
26
+ },
27
+ "main": "index.js",
28
+ "exports": {
29
+ ".": "./index.js",
30
+ "./package.json": "./package.json"
31
+ },
32
+ "files": [
33
+ "index.js",
34
+ "standard-data.js",
35
+ "map.js",
36
+ "glossary.js",
37
+ "data",
38
+ "docs/*.md",
39
+ "README.md",
40
+ "LICENSE"
41
+ ],
42
+ "engines": {
43
+ "node": "^20.19.0 || ^22.13.0 || >=24.0.0"
44
+ },
45
+ "publishConfig": {
46
+ "access": "public"
47
+ },
48
+ "scripts": {
49
+ "format": "prettier --write \"*.js\" \"scripts/**/*.js\" \"tests/**/*.js\"",
50
+ "format:check": "prettier --check \"*.js\" \"scripts/**/*.js\" \"tests/**/*.js\"",
51
+ "lint": "eslint .",
52
+ "map": "node scripts/generate-map.js",
53
+ "map:check": "node scripts/generate-map.js --check",
54
+ "test": "npm run format:check && npm run lint && npm run map:check && npm run compare:check && node --test",
55
+ "compare": "node scripts/compare-rgaa.js",
56
+ "compare:check": "node scripts/compare-rgaa.js --check"
57
+ },
58
+ "dependencies": {
59
+ "@surea11y/pack-rgaa": "~1.3.0"
60
+ },
61
+ "peerDependencies": {
62
+ "@surea11y/core": "~1.18.0"
63
+ },
64
+ "devDependencies": {
65
+ "@surea11y/core": "^1.18.0",
66
+ "eslint": "^10.12.0",
67
+ "jsdom": "^29.1.1",
68
+ "prettier": "^3.9.6"
69
+ }
70
+ }
@@ -0,0 +1,408 @@
1
+ /* SPDX-License-Identifier: MPL-2.0 AND LicenseRef-CC-BY-3.0-LU */
2
+
3
+ 'use strict';
4
+
5
+ /**
6
+ * RAWeb 1.1 as standard data (core's format surea11y-standard/1), built on
7
+ * RGAA 4.1.2's (core's deriveStandard, on @surea11y/pack-rgaa's data):
8
+ *
9
+ * - Its criteria and tests are RAWeb's own, in its own words (map.js), each
10
+ * based on the RGAA criterion or test of the same number where RGAA has
11
+ * one, so pack-rgaa's rule map reaches them.
12
+ * - Its rule map is pack-rgaa's, with the changes docs/RULE_MAP_REVIEW.md
13
+ * records for what RAWeb says differently (OWN_ROWS).
14
+ * - Each test's procedure is RAWeb's methodology; the English texts are
15
+ * RAWeb's own English version.
16
+ * - The profile raweb-1.1 and the law it is used for.
17
+ *
18
+ * The French and English texts are RAWeb's, by the Service information et
19
+ * presse (SIP), Government of Luxembourg, under CC BY 3.0 LU (data/README.md),
20
+ * restructured as data and not reworded; what joins them (failWhen, the
21
+ * labels of notes) and the rule map are this pack's.
22
+ */
23
+
24
+ const { deriveStandard, standardDataOf } = require('@surea11y/core/pack');
25
+ const rgaa = require('@surea11y/pack-rgaa');
26
+ const {
27
+ RAWEB_VERSIONS,
28
+ RAWEB_THEMES,
29
+ RAWEB_CRITERIA,
30
+ RAWEB_TESTS,
31
+ RAWEB_TRANSLATIONS
32
+ } = require('./map');
33
+
34
+ const VERSION = '1.1';
35
+ const BASE = { standard: 'rgaa', version: '4.1.2' };
36
+
37
+ const base = standardDataOf(rgaa.standard);
38
+ const baseTables = base.data[BASE.version];
39
+
40
+ // A test's text as a person reads it: its question and the conditions it
41
+ // lists.
42
+ const testTitle = (t) => [t.title, ...(t.conditions || []).map((c) => `- ${c}`)].join(' ');
43
+
44
+ const PASS_WHEN = {
45
+ fr: 'Si c’est le cas, le test est validé.',
46
+ en: 'If this is the case, the test is validated.'
47
+ };
48
+ const failWhen = {
49
+ fr: (id) => `Sinon, le test ${id} n’est pas validé.`,
50
+ en: (id) => `Otherwise, test ${id} is not validated.`
51
+ };
52
+
53
+ // RAWeb 1.1 publishes no methodology for 8.1.1 and 8.2.1 (map.js). A person
54
+ // still needs steps: these are the pack's, from the test's question and the
55
+ // glossary « Type de document », and the criterion's note says so.
56
+ const OWN_STEPS = {
57
+ fr: {
58
+ '8.1.1': [
59
+ 'Retrouver dans le code source de la page la balise doctype.',
60
+ 'Vérifier qu’elle est présente, placée avant la balise <html>, et qu’elle déclare un type de document HTML.'
61
+ ],
62
+ '8.2.1': [
63
+ 'Valider le code source généré de la page selon le type de document déclaré, par exemple avec le validateur HTML du W3C.',
64
+ 'Vérifier l’absence d’erreur de validation.'
65
+ ]
66
+ },
67
+ en: {
68
+ '8.1.1': [
69
+ 'Find the doctype in the page’s source code.',
70
+ 'Check that it is present, placed before the <html> tag, and that it declares an HTML document type.'
71
+ ],
72
+ '8.2.1': [
73
+ 'Validate the page’s generated source code against the declared document type, for example with the W3C HTML validator.',
74
+ 'Check that there is no validation error.'
75
+ ]
76
+ }
77
+ };
78
+ const OWN_STEPS_NOTE = (test) =>
79
+ `Le RAWeb 1.1 ne publie pas de méthodologie pour le test ${test} : ses étapes sont celles de ce module, tirées de la question du test et du glossaire « Type de document ».`;
80
+
81
+ // A test's methodology as a procedure, in one language.
82
+ function procedureOf(id, methodology, lang) {
83
+ if (!methodology) {
84
+ return OWN_STEPS[lang][id]
85
+ ? { steps: OWN_STEPS[lang][id], passWhen: PASS_WHEN[lang], failWhen: failWhen[lang](id) }
86
+ : null;
87
+ }
88
+ return {
89
+ steps: methodology.steps,
90
+ passWhen: methodology.passWhen || PASS_WHEN[lang],
91
+ failWhen: failWhen[lang](id)
92
+ };
93
+ }
94
+
95
+ // A criterion's particular cases, technical notes and test notes, under
96
+ // their headings, in French: RAWeb's English gives none of them.
97
+ function noteOf(id) {
98
+ const c = RAWEB_CRITERIA[VERSION][id];
99
+ const parts = [];
100
+ if (c.particularCases) parts.push(`Cas particuliers : ${c.particularCases.join(' ')}`);
101
+ if (c.technicalNotes) parts.push(`Notes techniques : ${c.technicalNotes.join(' ')}`);
102
+ for (const test of c.tests) {
103
+ const m = RAWEB_TESTS[VERSION][test].methodology;
104
+ if (m && m.note) parts.push(`Note du test ${test} : ${m.note}`);
105
+ if (!m && OWN_STEPS.fr[test]) parts.push(OWN_STEPS_NOTE(test));
106
+ }
107
+ return parts.join(' ');
108
+ }
109
+
110
+ // A row of pack-rgaa's rule map, changed. RGAA's test numbers are RAWeb's
111
+ // where RAWeb keeps a test, so a route names the same ids.
112
+ function rgaaRow(ruleId, change) {
113
+ const row = baseTables.ruleMap[ruleId];
114
+ if (!row) throw new Error(`pack-rgaa has no rule-map row for ${ruleId}`);
115
+ return change(JSON.parse(JSON.stringify(row)));
116
+ }
117
+
118
+ // What RAWeb says differently from RGAA, rule by rule: docs/RULE_MAP_REVIEW.md
119
+ // gives the reasons, and tests/standard.test.js a page for each.
120
+ const OWN_ROWS = {
121
+ // 1.2.1, condition 2: aria-hidden="true" alone is enough. A hidden image
122
+ // with a name passes 1.2.1 if decorative, and fails 1.1.1 if it carries
123
+ // information, which only a person can tell.
124
+ 'rgaa-img-decorative-no-alternative': rgaaRow('rgaa-img-decorative-no-alternative', (row) => ({
125
+ ...row,
126
+ reasonCodes: {
127
+ ...row.reasonCodes,
128
+ hiddenImgHasAlternative: { requirements: ['1.1.1'], outcome: 'cantTell' }
129
+ },
130
+ note: 'RAWeb 1.2.1, condition 2, accepts aria-hidden="true" alone: an <img aria-hidden="true"> with a title or an ARIA name passes 1.2.1 if it is decorative, and fails 1.1.1 if it carries information, so it is a question under 1.1.1 (hiddenImgHasAlternative). An image marked decorative by alt="" or a presentation role that keeps a name is asked about under 1.2.1, 1.1.1 and 1.3.1, as RGAA: conditions 1 and 3 forbid the name.'
131
+ })),
132
+ // 1.2.4: aria-hidden="true" is enough for a decorative SVG.
133
+ 'rgaa-svg-hidden-no-alternative': rgaaRow('rgaa-svg-hidden-no-alternative', (row) => ({
134
+ ...row,
135
+ requirements: [],
136
+ asks: ['1.1.5'],
137
+ note: 'RAWeb 1.2.4 asks only aria-hidden="true" of a decorative <svg>: an <svg aria-hidden="true"> with a name passes it. Whether the image carries information, and so is wrongly hidden, is asked under 1.1.5.'
138
+ })),
139
+ 'svg-text-alternative-quality': rgaaRow('svg-text-alternative-quality', (row) => ({
140
+ ...row,
141
+ reasonCodes: { ...row.reasonCodes, TEXT_ALTERNATIVE_REVIEW: { requirements: ['1.3.6'] } },
142
+ note: 'Asks a person to judge the relevance of an <svg>’s title or ARIA name, which is 1.3.6. An <svg> found decorative that keeps its alternative no longer fails RAWeb 1.2.4, which asks only aria-hidden="true". An image that is a link’s or button’s only content counts toward no test: its alternative is the control’s name.'
143
+ })),
144
+ // 1.9: RAWeb removes the role and aria-label conditions this rule checks.
145
+ 'rgaa-figure-caption-structure': null,
146
+ // 5.7.6: RAWeb accepts scope="rowgroup" and "colgroup" on a header over a
147
+ // group of rows or columns.
148
+ 'rgaa-th-scope-row-col': rgaaRow('rgaa-th-scope-row-col', (row) => ({
149
+ ...row,
150
+ findings: [
151
+ {
152
+ when: { scope: 'rowgroup' },
153
+ requirements: ['5.7.2', '5.7.3', '5.7.6'],
154
+ outcome: 'cantTell'
155
+ },
156
+ {
157
+ when: { scope: 'colgroup' },
158
+ requirements: ['5.7.2', '5.7.3', '5.7.6'],
159
+ outcome: 'cantTell'
160
+ }
161
+ ],
162
+ note: 'Fails a <th> whose scope is neither row nor col nor, as RAWeb 5.7.6 adds, rowgroup or colgroup (a misspelt or empty value): 5.7.2 wants row or col on a header over a whole row or column, and 5.7.3 no scope on one over part of it. scope="rowgroup" or "colgroup" passes 5.7.6 on a header over a group of rows or columns, and fails 5.7.2 or 5.7.3 on any other, which only a person can tell: it is a question under the three. Also fails a scope pointing the wrong way where the table’s shape makes it certain.'
163
+ })),
164
+ // 6.1.6: RAWeb's own test for identical links; the glossary note RGAA's
165
+ // 6.1.1 to 6.1.4 leaned on is gone.
166
+ 'identical-links-same-purpose': rgaaRow('identical-links-same-purpose', () => ({
167
+ requirements: [],
168
+ asks: ['6.1.6'],
169
+ note: 'Asks whether links with the same name and different destinations serve the same purpose: RAWeb 6.1.6, « Chaque lien identique a-t-il les mêmes fonction et destination ? », with the glossary « Lien identique ». It only asks, since the context may tell the links apart.',
170
+ outsideCorrespondence: {
171
+ '6.1.6':
172
+ 'RAWeb relates criterion 6.1 to WCAG 2.4.4 and not to 2.4.9, under which core files this rule, yet 6.1.6 asks exactly its question: whether links with the same name have the same function and destination.'
173
+ }
174
+ })),
175
+ // 6.1.2, 6.1.3: RAWeb removes the glossary note this rule rests on.
176
+ 'rgaa-link-title-content-name': null,
177
+ // 6.2.1: an accessible name is enough.
178
+ 'rgaa-link-content-label-present': null,
179
+ 'link-name-present': {
180
+ requirements: ['6.2.1'],
181
+ note: 'Fails a link with no accessible name at all, which is RAWeb 6.2.1, « chaque lien a-t-il un intitulé ? »: RAWeb’s glossary « Intitulé (ou nom accessible) de lien » takes the name from aria-labelledby, aria-label, the content or title, in that order, and its revision notes limit 6.2 to a link with no accessible name.'
182
+ },
183
+ // 8.1.1: one test for RGAA's three (present, valid, before <html>).
184
+ 'rgaa-doctype-valid': rgaaRow('rgaa-doctype-valid', (row) => ({
185
+ ...row,
186
+ requirements: ['8.1.1'],
187
+ note: 'RAWeb 8.1.1 asks whether each page is defined by a document type, in place of RGAA’s 8.1.1 to 8.1.3. A doctype whose name is not html does not define the page for user agents (glossary « Type de document »), so it fails; an unknown public identifier is asked about.'
188
+ })),
189
+ 'rgaa-doctype-position': rgaaRow('rgaa-doctype-position', (row) => ({
190
+ ...row,
191
+ requirements: ['8.1.1'],
192
+ note: 'RAWeb 8.1.1 asks whether each page is defined by a document type. A doctype written after <html> is dropped by the HTML parser, so it defines nothing for user agents: it fails 8.1.1. It asks when the page source is not given.'
193
+ })),
194
+ // 9.2.1: a computed role, from the element or role; no single visible
195
+ // <main> condition (9.2.2 has one, on the computed role).
196
+ 'rgaa-main-element-structure': rgaaRow('rgaa-main-element-structure', (row) => ({
197
+ ...row,
198
+ reasonCodes: {
199
+ ...row.reasonCodes,
200
+ roleMainOnly: { requirements: [] },
201
+ roleZoneOnly: { requirements: [] },
202
+ extraMain: { requirements: [] },
203
+ revealableMain: { requirements: [] },
204
+ hiddenByAncestor: { requirements: [] }
205
+ },
206
+ note: 'RAWeb 9.2.1 asks for a computed role of main on the main content zone, from <main> or role="main": a page with text and neither fails it (noMain), and one whose main content may be in a frame, or whose every <main> is hidden, is asked about. A role on another element, a second <main> and how one is hidden count toward no test: RAWeb accepts role="main" and the other zone roles on any element, and its single visible main is 9.2.2’s, on the computed role.'
207
+ })),
208
+ // 9.2.2: one visible element of each computed role.
209
+ 'landmark-no-duplicate-main': {
210
+ requirements: ['9.2.2'],
211
+ note: 'Asks about a page exposing more than one main landmark: RAWeb 9.2.2, condition 1, « un seul élément visible avec le rôle calculé de main ». Only landmarks exposed to assistive technologies are counted.'
212
+ },
213
+ 'landmark-no-duplicate-banner': {
214
+ requirements: ['9.2.2'],
215
+ note: 'Asks about a page exposing more than one banner landmark: RAWeb 9.2.2, condition 2, « un seul élément visible avec le rôle calculé de banner ».'
216
+ },
217
+ 'landmark-no-duplicate-contentinfo': {
218
+ requirements: ['9.2.2'],
219
+ note: 'Asks about a page exposing more than one contentinfo landmark: RAWeb 9.2.2, condition 3, « un seul élément visible avec le rôle calculé de contentinfo ».'
220
+ },
221
+ // 9.2.1, 9.2.3, 9.2.4: the zones' computed roles, and a page header or
222
+ // footer nested where it loses its role.
223
+ 'page-zones-landmark': {
224
+ requirements: ['9.2.1'],
225
+ reasonCodes: {
226
+ HEADER_NESTED: { requirements: ['9.2.3'] },
227
+ FOOTER_NESTED: { requirements: ['9.2.4'] }
228
+ },
229
+ note: 'Asks about a block named as the page header, a navigation or the footer, or a search form, that has no computed role of its nature (RAWeb 9.2.1), and about a page header or footer nested in a section, where it loses its role, on a page with none at the top (9.2.3, 9.2.4). It only asks: which block is a zone of the page is for a person.'
230
+ },
231
+ // 10.1.2: width and height are allowed on <iframe> and <source>.
232
+ 'rgaa-presentational-attributes-absent': rgaaRow(
233
+ 'rgaa-presentational-attributes-absent',
234
+ (row) => ({
235
+ ...row,
236
+ findings: [
237
+ { when: { element: 'iframe' }, requirements: ['10.1.2'], outcome: 'cantTell' },
238
+ { when: { element: 'source' }, requirements: ['10.1.2'], outcome: 'cantTell' }
239
+ ],
240
+ note: 'Fails each element carrying an attribute RAWeb 10.1.2 lists. RAWeb allows width and height on <iframe> and <source>, which RGAA does not, and still forbids frameborder or align there: the rule reports an element’s attributes together, so one on an <iframe> or a <source> is a question, for a person to see which it carries.'
241
+ })
242
+ ),
243
+ // 11.10: a login form (an identifier and a password) is not applicable,
244
+ // which the rule doesn't tell; condition 2 of 11.10.1 accepts a field with
245
+ // required.
246
+ 'rgaa-required-field-indication': rgaaRow('rgaa-required-field-indication', (row) => ({
247
+ ...row,
248
+ reasonCodes: {
249
+ ...row.reasonCodes,
250
+ requiredNotIndicated: { requirements: ['11.10.2'], outcome: 'cantTell' },
251
+ allFieldsRequiredSentence: { requirements: ['11.10.2'], outcome: 'cantTell' },
252
+ markerNotExplained: { requirements: ['11.10.2'], outcome: 'cantTell' },
253
+ markerExplainedAfter: { outcome: 'cantTell' }
254
+ },
255
+ note: 'Asks about a required field whose label and linked passages show no indication, and about a sign explained after its first use or never: RAWeb’s particular case of 11.10 leaves out a form of only an identifier and a password field, which only a person can tell, so its findings are questions. A field with required or aria-required="true" meets condition 2 of 11.10.1, so what is found on such a field counts toward 11.10.2 only.'
256
+ })),
257
+ // 12.6.1 leaves out the main zones this rule looks for.
258
+ 'rgaa-page-zones-reachable': null,
259
+ // 13.5.1: RAWeb no longer accepts a title as the meaning of cryptic
260
+ // content, which RGAA does.
261
+ 'rgaa-cryptic-content-review': rgaaRow('rgaa-cryptic-content-review', (row) => ({
262
+ ...row,
263
+ reasonCodes: { ...row.reasonCodes, titleOnly: { requirements: ['13.5.1'] } },
264
+ note: 'Asks about text emoticons, emoji and ASCII art whose meaning the text next to them may not give: RAWeb 13.5.1 asks that the meaning of cryptic content « porteur d’information » be given « dans le contexte adjacent » or « par une méthode compatible avec l’accessibilité ». Content with a title is asked about too (titleOnly): RAWeb’s technical note on 13.5 says a title or <abbr> does not make the criterion compliant.'
265
+ }))
266
+ };
267
+
268
+ const criteria = RAWEB_CRITERIA[VERSION];
269
+ const tests = RAWEB_TESTS[VERSION];
270
+ const en = RAWEB_TRANSLATIONS[VERSION].en;
271
+
272
+ const requirements = Object.fromEntries(
273
+ Object.entries(criteria).map(([id, c]) => {
274
+ const note = noteOf(id);
275
+ return [
276
+ id,
277
+ {
278
+ ...(baseTables.requirements[id] ? { basedOn: [{ standard: 'rgaa', id }] } : {}),
279
+ title: c.title,
280
+ wcagSc: c.wcagSc,
281
+ tests: c.tests,
282
+ // A criterion of RAWeb's own, which no rule checks in full.
283
+ ...(baseTables.requirements[id] ? {} : { partial: true }),
284
+ ...(note ? { note } : {})
285
+ }
286
+ ];
287
+ })
288
+ );
289
+
290
+ const testRows = Object.fromEntries(
291
+ Object.entries(tests).map(([id, t]) => {
292
+ const procedure = procedureOf(id, t.methodology, 'fr');
293
+ return [
294
+ id,
295
+ {
296
+ ...(baseTables.tests[id] ? { basedOn: [{ standard: 'rgaa', id }] } : {}),
297
+ title: testTitle(t),
298
+ requirements: [t.criterion],
299
+ ...(procedure ? { procedure } : {})
300
+ }
301
+ ];
302
+ })
303
+ );
304
+
305
+ // RAWeb's own English, keyed as core reads a version's texts.
306
+ function englishTexts() {
307
+ const out = {};
308
+ for (const id of Object.keys(criteria)) out[`requirements.${id}.title`] = en.criteria[id].title;
309
+ for (const [id, t] of Object.entries(tests)) {
310
+ const e = en.tests[id];
311
+ out[`tests.${id}.title`] = testTitle(e);
312
+ const procedure = procedureOf(id, e.methodology, 'en');
313
+ if (procedure && procedureOf(id, t.methodology, 'fr')) {
314
+ out[`tests.${id}.procedure.steps`] = procedure.steps;
315
+ out[`tests.${id}.procedure.passWhen`] = procedure.passWhen;
316
+ out[`tests.${id}.procedure.failWhen`] = procedure.failWhen;
317
+ }
318
+ }
319
+ for (const theme of en.themes) out[`groups.${theme.number}.title`] = theme.title;
320
+ out.notes = NOTES.en;
321
+ return out;
322
+ }
323
+
324
+ // What a reader should know before using the procedures.
325
+ const NOTES = {
326
+ fr: [
327
+ 'Ces procédures reprennent la méthodologie de test du RAWeb 1.1 (Service information et presse, Gouvernement du Grand-Duché de Luxembourg, CC BY 3.0 LU). Elles s’utilisent avec le référentiel et son glossaire (https://accessibilite.public.lu/fr/raweb1.1/index.html) et ne les remplacent pas.',
328
+ 'Chaque facette liste les règles qui portent sur son test : celles de @surea11y/pack-rgaa et de @surea11y/core que la correspondance de ce module rattache à ce test (docs/RULE_MAP_REVIEW.md).'
329
+ ],
330
+ en: [
331
+ 'These procedures follow the RAWeb 1.1 testing methodology (Service information et presse, Government of the Grand Duchy of Luxembourg, CC BY 3.0 LU). They are used with the framework and its glossary (https://accessibilite.public.lu/en/raweb1.1/index.html) and do not replace them.',
332
+ 'Each facet lists the rules that check its test: those of @surea11y/pack-rgaa and @surea11y/core that this pack’s mapping links to the test (docs/RULE_MAP_REVIEW.md).'
333
+ ]
334
+ };
335
+
336
+ // The law the profile is used for, named with a link to its official text:
337
+ // the pack tests RAWeb's criteria and says which law a scan was run for; it
338
+ // doesn't document the law.
339
+ const LAWS = {
340
+ 'lu-loi-2019-05-28': {
341
+ name: 'Loi du 28 mai 2019 relative à l’accessibilité des sites internet et des applications mobiles des organismes du secteur public',
342
+ jurisdiction: 'LU',
343
+ sources: [
344
+ {
345
+ title: 'Legilux, loi du 28 mai 2019',
346
+ url: 'https://legilux.public.lu/eli/etat/leg/loi/2019/05/28/a373/jo'
347
+ }
348
+ ]
349
+ }
350
+ };
351
+
352
+ const wcagVersionOf = (version) => RAWEB_VERSIONS.find((v) => v.version === version).wcagVersion;
353
+
354
+ // RAWeb alone: the rules its map links to a test, pack-rgaa's and core's
355
+ // (mappedRules), and nothing else, so results hold RAWeb's criteria and no
356
+ // WCAG ones. RAWeb relates 8.1 and 8.2 to WCAG 4.1.1 Parsing, which the 2023
357
+ // errata to WCAG 2.1 no longer count: keepsParsing keeps a duplicate id a
358
+ // failure of 8.2.1.
359
+ const PROFILES = {
360
+ 'raweb-1.1': {
361
+ version: VERSION,
362
+ tags: ['raweb'],
363
+ mappedRules: true,
364
+ wcagVersion: wcagVersionOf(VERSION),
365
+ keepsParsing: true,
366
+ law: 'lu-loi-2019-05-28'
367
+ }
368
+ };
369
+
370
+ const STANDARD_DATA = deriveStandard([base], {
371
+ format: 'surea11y-standard/1',
372
+ key: 'raweb',
373
+ standard: 'RAWeb',
374
+ lang: 'fr',
375
+ // As RGAA: mapped rule by rule, and a rule is linked only to tests whose
376
+ // WCAG criteria meet its own, unless its row says why.
377
+ options: { ruleMapped: true, wcagCorrespondence: true },
378
+ versions: RAWEB_VERSIONS.map(({ version, wcagVersion, published }) => ({
379
+ version,
380
+ wcagVersion,
381
+ published,
382
+ basedOn: [BASE]
383
+ })),
384
+ data: {
385
+ [VERSION]: {
386
+ groups: RAWEB_THEMES[VERSION].map(({ number, title }) => ({
387
+ id: String(number),
388
+ title,
389
+ requirements: Object.keys(criteria).filter((id) => criteria[id].theme === number)
390
+ })),
391
+ requirements,
392
+ tests: testRows,
393
+ ruleMap: OWN_ROWS,
394
+ notes: NOTES.fr,
395
+ texts: { en: englishTexts() }
396
+ }
397
+ },
398
+ profiles: PROFILES,
399
+ laws: LAWS,
400
+ texts: {
401
+ en: {
402
+ 'laws.lu-loi-2019-05-28.name':
403
+ 'Law of 28 May 2019 on the accessibility of the websites and mobile applications of public sector bodies'
404
+ }
405
+ }
406
+ });
407
+
408
+ module.exports = { STANDARD_DATA, OWN_ROWS };