@uuv/a11y 1.0.0-beta.1 → 1.0.0-beta.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [1.0.0-beta.2](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.1...a11y-v1.0.0-beta.2) (2024-01-08)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **a11y:** fix post first publish, [#330](https://github.com/Orange-OpenSource/uuv/issues/330) ([76cf65b](https://github.com/Orange-OpenSource/uuv/commit/76cf65ba219f6128c58ecdec608d3cb4fe72bcc9))
7
+ * **a11y:** update unpkg usage and stackblitz link, [#330](https://github.com/Orange-OpenSource/uuv/issues/330) ([6032415](https://github.com/Orange-OpenSource/uuv/commit/6032415fdf16ae1be23e96785e7c66b779d8cbf9))
8
+
1
9
  ## 1.0.0-beta.1 (2024-01-08)
2
10
 
3
11
 
package/README.md CHANGED
@@ -68,7 +68,7 @@ The following references are available :
68
68
 
69
69
  For each criterion of the RGAA, the following algorithm is executed :
70
70
 
71
- ![Diagram a11Y RGAA](/docs/diagram-a11y-rgaa.png)
71
+ ![Diagram a11Y RGAA](https://unpkg.com/@uuv/a11y/docs/diagram-a11y-rgaa.png)
72
72
 
73
73
  **Consult [this page](https://orange-opensource.github.io/uuv/docs/tools/uuv-a11y#rgaa) to find out which RGAA verifications are implemented in the library**
74
74
  </p>
@@ -77,21 +77,21 @@ For each criterion of the RGAA, the following algorithm is executed :
77
77
  ### With UNPKG
78
78
  1. Add script tag to import @uuv/a11y in your html page :
79
79
  ```html
80
- <script src="https://unpkg.com/@uuv/a11y/dist/bundle/uuv-a11y.bundle.js">
80
+ <script src="https://unpkg.com/@uuv/a11y/bundle/uuv-a11y.bundle.js">
81
81
  </script>
82
82
  ```
83
83
  2. Add script tag to execute
84
84
  ```html
85
- <script>
86
- const rgaaChecker = new uuvA11y.RgaaChecker(url, enabledRules);
85
+ <script type="module">
86
+ const rgaaChecker = new uuvA11y.RgaaChecker(window.location.url);
87
87
  const result = await rgaaChecker.validate().toPromise();
88
88
  // Print complete result
89
- console.log(result);
89
+ console.log('result', result);
90
90
  // Print result summary group by criteria
91
- console.log(result.summary());
91
+ console.log('summary', result.summary());
92
92
  </script>
93
93
  ```
94
- [Stackblitz example](https://stackblitz.com/edit/web-platform-fihgra?file=index.html)
94
+ [Stackblitz example](https://stackblitz.com/edit/web-platform-fihgra?devToolsHeight=33&file=index.html)
95
95
 
96
96
  ### As a dependency
97
97
  1. Import @uuv/a11y npm dependency
@@ -113,72 +113,269 @@ For each criterion of the RGAA, the following algorithm is executed :
113
113
  // Print result summary group by criteria
114
114
  console.log(result.summary());
115
115
  ```
116
- ### During E2E Testing (recommended usage car visualisation des noeuds)
116
+ ### During E2E Testing (recommended usage because it allows DOM nodes to be visualized)
117
117
  1. add `@uuv/cypress` npm dependency :
118
118
  ```shell
119
119
  npm install --save-dev @uuv/cypress
120
120
  ```
121
- 2. create the file `uuv/e2e/a11y.feature` in the project root with the following content and replace url `https://e2e-test-quest.github.io/simple-webapp/a11y-test.html` by yours :
122
- ```gherkin
123
- Feature: A11y
124
-
125
- Scenario: Default RGAA
126
- When I visit path "https://e2e-test-quest.github.io/simple-webapp/a11y-test.html"
127
- Then I should not have any rgaa accessibility issue
128
-
129
- Scenario: RGAA with result
130
- When I visit path "https://e2e-test-quest.github.io/simple-webapp/a11y-test.html"
131
- Then I should have the following result based on the rgaa reference
132
- """json
133
- {
134
- "status": "error",
135
- "criteria": {
136
- "1.1": {
137
- "status": "error"
138
- },
139
- "1.2": {
140
- "status": "error"
141
- },
142
- "1.3": {
143
- "status": "manual"
144
- },
145
- "1.4": {
146
- "status": "manual"
147
- },
148
- "1.5": {
149
- "status": "manual"
150
- },
151
- "1.6": {
152
- "status": "success"
153
- },
154
- "2.1": {
155
- "status": "error"
156
- },
157
- "8.1": {
158
- "status": "error"
159
- },
160
- "8.3": {
161
- "status": "success"
162
- },
163
- "8.4": {
164
- "status": "manual"
165
- },
166
- "8.5": {
167
- "status": "error"
168
- },
169
- "8.6": {
170
- "status": "manual"
171
- },
172
- "8.10": {
173
- "status": "error"
174
- },
175
- "11.1": {
176
- "status": "success"
121
+ 2. create the file `uuv/e2e/a11y.feature` in the project root with the following content and replace url `https://e2e-test-quest.github.io/simple-webapp/a11y-test.html` by yours :
122
+ ```gherkin
123
+ Feature: A11y validation
124
+
125
+ Scenario: Default RGAA
126
+ When I visit path "https://e2e-test-quest.github.io/simple-webapp/a11y-test.html"
127
+ Then I should not have any rgaa accessibility issue
128
+
129
+ Scenario: RGAA with result
130
+ When I visit path "https://e2e-test-quest.github.io/simple-webapp/a11y-test.html"
131
+ Then I should have the following result based on the rgaa reference
132
+ """json
133
+ {
134
+ "status": "error",
135
+ "criteria": {
136
+ "1.1": {
137
+ "status": "error",
138
+ "tests" : {
139
+ "1.1.1": {
140
+ "status": "error"
141
+ },
142
+ "1.1.2": {
143
+ "status": "error"
144
+ },
145
+ "1.1.3": {
146
+ "status": "success"
147
+ },
148
+ "1.1.4": {
149
+ "status": "success"
150
+ },
151
+ "1.1.5": {
152
+ "status": "error"
153
+ },
154
+ "1.1.6": {
155
+ "status": "error"
156
+ },
157
+ "1.1.7": {
158
+ "status": "error"
159
+ },
160
+ "1.1.8": {
161
+ "status": "success"
162
+ }
163
+ }
164
+ },
165
+ "1.2": {
166
+ "status": "success",
167
+ "tests": {
168
+ "1.2.1": {
169
+ "status": "success"
170
+ },
171
+ "1.2.2": {
172
+ "status": "success"
173
+ },
174
+ "1.2.3": {
175
+ "status": "success"
176
+ },
177
+ "1.2.4": {
178
+ "status": "success"
179
+ },
180
+ "1.2.5": {
181
+ "status": "success"
182
+ },
183
+ "1.2.6": {
184
+ "status": "success"
185
+ }
186
+ }
187
+ },
188
+ "1.3": {
189
+ "status": "manual",
190
+ "tests": {
191
+ "1.3.1": {
192
+ "status": "manual"
193
+ },
194
+ "1.3.2": {
195
+ "status": "manual"
196
+ },
197
+ "1.3.3": {
198
+ "status": "manual"
199
+ },
200
+ "1.3.4": {
201
+ "status": "success"
202
+ },
203
+ "1.3.5": {
204
+ "status": "success"
205
+ },
206
+ "1.3.6": {
207
+ "status": "success"
208
+ },
209
+ "1.3.7": {
210
+ "status": "success"
211
+ },
212
+ "1.3.9": {
213
+ "status": "manual"
214
+ }
215
+ }
216
+ },
217
+ "1.4": {
218
+ "status": "manual",
219
+ "tests": {
220
+ "1.4.1": {
221
+ "status": "manual"
222
+ },
223
+ "1.4.2": {
224
+ "status": "manual"
225
+ },
226
+ "1.4.3": {
227
+ "status": "manual"
228
+ },
229
+ "1.4.4": {
230
+ "status": "success"
231
+ },
232
+ "1.4.5": {
233
+ "status": "success"
234
+ },
235
+ "1.4.6": {
236
+ "status": "success"
237
+ },
238
+ "1.4.7": {
239
+ "status": "success"
240
+ }
241
+ }
242
+ },
243
+ "1.5": {
244
+ "status": "manual",
245
+ "tests": {
246
+ "1.5.1": {
247
+ "status": "manual"
248
+ },
249
+ "1.5.2": {
250
+ "status": "manual"
251
+ }
252
+ }
253
+ },
254
+ "1.6": {
255
+ "status": "manual",
256
+ "tests": {
257
+ "1.6.1": {
258
+ "status": "success"
259
+ },
260
+ "1.6.2": {
261
+ "status": "success"
262
+ },
263
+ "1.6.3": {
264
+ "status": "success"
265
+ },
266
+ "1.6.4": {
267
+ "status": "success"
268
+ },
269
+ "1.6.5": {
270
+ "status": "success"
271
+ },
272
+ "1.6.6": {
273
+ "status": "success"
274
+ },
275
+ "1.6.7": {
276
+ "status": "success"
277
+ },
278
+ "1.6.8": {
279
+ "status": "success"
280
+ },
281
+ "1.6.9": {
282
+ "status": "manual"
283
+ },
284
+ "1.6.10": {
285
+ "status": "manual"
286
+ }
287
+ }
288
+ },
289
+ "2.1": {
290
+ "status": "error",
291
+ "tests": {
292
+ "2.1.1": {
293
+ "status": "error"
294
+ }
295
+ }
296
+ },
297
+ "2.2": {
298
+ "status": "manual",
299
+ "tests": {
300
+ "2.2.1": {
301
+ "status": "manual"
302
+ }
303
+ }
304
+ },
305
+ "3.1": {
306
+ "status": "manual",
307
+ "tests": {
308
+ "3.1.3": {
309
+ "status": "success"
310
+ },
311
+ "3.1.5": {
312
+ "status": "manual"
313
+ },
314
+ "3.1.6": {
315
+ "status": "manual"
316
+ }
317
+ }
318
+ },
319
+ "8.1": {
320
+ "status": "error",
321
+ "tests": {
322
+ "8.1.1": {
323
+ "status": "error"
324
+ }
325
+ }
326
+ },
327
+ "8.3": {
328
+ "status": "success",
329
+ "tests": {
330
+ "8.3.1": {
331
+ "status": "success"
332
+ }
333
+ }
334
+ },
335
+ "8.4": {
336
+ "status": "manual",
337
+ "tests": {
338
+ "8.4.1": {
339
+ "status": "manual"
340
+ }
341
+ }
342
+ },
343
+ "8.5": {
344
+ "status": "error",
345
+ "tests": {
346
+ "8.5.1": {
347
+ "status": "error"
348
+ }
349
+ }
350
+ },
351
+ "8.6": {
352
+ "status": "manual",
353
+ "tests": {
354
+ "8.6.1": {
355
+ "status": "manual"
356
+ }
357
+ }
358
+ },
359
+ "8.10": {
360
+ "status": "error",
361
+ "tests": {
362
+ "8.10.1": {
363
+ "status": "error"
364
+ }
365
+ }
366
+ },
367
+ "11.1": {
368
+ "status": "success",
369
+ "tests": {
370
+ "11.1.1": {
371
+ "status": "success"
372
+ }
373
+ }
374
+ }
375
+ }
177
376
  }
178
- }
179
- }
180
- """
181
- ```
377
+ """
378
+ ```
182
379
  3. Then execute your tests :
183
380
  ```shell
184
381
  npx uuv e2e