@uuv/a11y 1.0.0-beta.3 → 1.0.0-beta.5

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,19 @@
1
+ ## [1.0.0-beta.5](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.4...a11y-v1.0.0-beta.5) (2024-01-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **a11y:** update dependency @testing-library/dom to v9.3.4 ([368b6b4](https://github.com/Orange-OpenSource/uuv/commit/368b6b4210f83d2da7695a0bfedd8ac593df171a))
7
+ * **assistant:** fix assistant and enable uuv test for assistant, [#437](https://github.com/Orange-OpenSource/uuv/issues/437) ([da82e1b](https://github.com/Orange-OpenSource/uuv/commit/da82e1b588a391eb24573ac8c3f2db18cfdbf5a5))
8
+ * **deps:** update dependency @easyops-cn/docusaurus-search-local to v0.40.1 ([d5ed3d7](https://github.com/Orange-OpenSource/uuv/commit/d5ed3d75f44e2b83af81fcd7227521dea00371e6))
9
+
10
+ ## [1.0.0-beta.4](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.3...a11y-v1.0.0-beta.4) (2024-01-11)
11
+
12
+
13
+ ### Features
14
+
15
+ * **a11y:** add a contains sentence for a11y rgaa, [#424](https://github.com/Orange-OpenSource/uuv/issues/424) ([297cc33](https://github.com/Orange-OpenSource/uuv/commit/297cc3378798d1eb9c973a2038423ae6f874f70f))
16
+
1
17
  ## [1.0.0-beta.3](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.2...a11y-v1.0.0-beta.3) (2024-01-08)
2
18
 
3
19
 
@@ -0,0 +1,46 @@
1
+ # Contributors guide
2
+
3
+ First, read the general [CONTRIBUTING](../../CONTRIBUTING.md) file
4
+
5
+ ## How Contribue to @uuv/a11y ?
6
+ This [page](./STRUCTURE.md) gives you an overview of the @uuv/a11y module structure.
7
+
8
+ ### Add new RGAA rules
9
+ 1. Identify the file concerned by the new rule you want to add <br>
10
+ For example :
11
+ - a rule on test **1**.1.4 will concern the file `a11y/src/lib/reference/rgaa/rules/1-image.ts`
12
+ - a rule on test **7**.1.1 will concern the file `a11y/src/lib/reference/rgaa/rules/7-script.ts`
13
+ 2. Make sure the rule doesn't already exist in the file
14
+ 3. Add your rule to the file, a rule can be :
15
+ - `Auto` : it can be checked automatically, then you can follow the example below :
16
+ ```typescript
17
+ AutoCheckA11yRule.from({
18
+ reference: "RGAA",
19
+ criterion: "1.1",
20
+ id: "1.1.5",
21
+ elementType: "svg",
22
+ query: new ByTagQuery([
23
+ "svg:not([role=img])"
24
+ ]),
25
+ description: "svg has no image role",
26
+ help: "set image role to svg"
27
+ })
28
+ ```
29
+ - `Manual` : It must be checked manually by a human, then you can follow the example below :
30
+ ```typescript
31
+ ManualCheckA11yRule.from({
32
+ reference: "RGAA",
33
+ criterion: "1.3",
34
+ wcag: "4.1.2 A",
35
+ id: "1.3.1",
36
+ elementType: "image",
37
+ query: new ByTagQuery(informativeContent.image.buildSelectorWithAttributes()),
38
+ attributes: informativeContent.image.ATTRIBUTES,
39
+ description: "if present, attributes alt, title, aria-label, aria-labelledby must be relevant",
40
+ help: "adapt these attributes to be relevant"
41
+ })
42
+ ```
43
+ **Adding a new rule may require you to create a new query, in which case remember to write the corresponding automated tests in the `a11y/test/query/**` directory.**
44
+
45
+
46
+ 4. Create or enhance the automated topic test file in the directory `a11y/test/checker/**`.
package/README.md CHANGED
@@ -125,262 +125,45 @@ For each criterion of the RGAA, the following algorithm is executed :
125
125
  Scenario: Default RGAA
126
126
  When I visit path "https://e2e-test-quest.github.io/simple-webapp/a11y-test.html"
127
127
  Then I should not have any rgaa accessibility issue
128
-
129
- Scenario: RGAA with result
128
+
129
+ Scenario: RGAA with partial result
130
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": {
131
+ Then I should have the following partial result based on the rgaa reference
132
+ """json
133
+ {
137
134
  "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
- }
376
- }
377
- """
378
- ```
135
+ "criteria": {
136
+ "1.5": {
137
+ "status": "manual"
138
+ },
139
+ "1.6": {
140
+ "status": "manual",
141
+ "tests": {
142
+ "1.6.5": {
143
+ "status": "success"
144
+ }
145
+ }
146
+ },
147
+ "11.1": {
148
+ "status": "success",
149
+ "tests": {
150
+ "11.1.1": {
151
+ "status": "success"
152
+ }
153
+ }
154
+ }
155
+ }
156
+ }
157
+ """
158
+ ```
159
+ You can also see the [French example](https://github.com/Orange-OpenSource/uuv/blob/main/example/fr-rgaa.feature) or the complete [English example](https://github.com/Orange-OpenSource/uuv/blob/main/example/en-rgaa.feature).
379
160
  3. Then execute your tests :
380
161
  ```shell
381
162
  npx uuv e2e
382
163
  ```
383
164
 
165
+ ## Want to contribute ?
166
+ Your help is welcome, see the [Contributors guide](https://github.com/Orange-OpenSource/uuv/blob/main/packages/a11y/CONTRIBUTING.md).
384
167
 
385
168
  ## License
386
169
 
package/STRUCTURE.md ADDED
@@ -0,0 +1,10 @@
1
+ # Structure of the source
2
+
3
+ The a11y sources are mainly located in the `packages/a11y/src/lib` directory :
4
+
5
+ | Directory | Description |
6
+ |-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
7
+ | `engine` | Represents execution engine |
8
+ | `model` | Contains classes and interfaces to describe rules and results |
9
+ | `query` | A query is a component used to retrieve dom elements according to certain criteria.<br> Exemple : <br> - `by-role.query` : retrieve dom nodes based on their accessible role<br> - `by-tag.query` : retrieve dom nodes based on their html tag name |
10
+ | `reference` | Contains declarations of accessibility standards supported by the `@uuv/a11y` solution, in particular RGAA |