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

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.
Files changed (63) hide show
  1. package/CHANGELOG.md +168 -0
  2. package/CONTRIBUTING.md +46 -0
  3. package/LICENSE +1 -1
  4. package/README.md +32 -249
  5. package/STRUCTURE.md +10 -0
  6. package/bundle/uuv-a11y.bundle.js +2 -2
  7. package/bundle/uuv-a11y.bundle.js.LICENSE.txt +1 -19
  8. package/dist/CHANGELOG.md +169 -0
  9. package/dist/CONTRIBUTING.md +46 -0
  10. package/dist/README.md +32 -249
  11. package/dist/STRUCTURE.md +10 -0
  12. package/dist/lib/engine/engine.js +28 -16
  13. package/dist/lib/model/index.d.ts +1 -1
  14. package/dist/lib/model/index.js +1 -1
  15. package/dist/lib/model/result.d.ts +2 -1
  16. package/dist/lib/model/rule.d.ts +0 -7
  17. package/dist/lib/model/rule.js +0 -2
  18. package/dist/lib/query/00-query.d.ts +6 -1
  19. package/dist/lib/query/00-query.js +10 -0
  20. package/dist/lib/query/accessible-name.query.d.ts +4 -2
  21. package/dist/lib/query/accessible-name.query.js +10 -7
  22. package/dist/lib/query/by-role.query.d.ts +4 -3
  23. package/dist/lib/query/by-role.query.js +22 -6
  24. package/dist/lib/query/by-sibling.query.d.ts +12 -0
  25. package/dist/lib/query/by-sibling.query.js +100 -0
  26. package/dist/lib/query/by-tag.query.d.ts +2 -2
  27. package/dist/lib/query/by-tag.query.js +4 -5
  28. package/dist/lib/query/compliant-attributes/attribut-specification.d.ts +34 -0
  29. package/dist/lib/query/compliant-attributes/attribut-specification.js +96 -0
  30. package/dist/lib/query/compliant-attributes/attribute-checker.d.ts +47 -0
  31. package/dist/lib/query/compliant-attributes/attribute-checker.js +73 -0
  32. package/dist/lib/query/compliant-attributes/compliant-attributes.query.d.ts +9 -0
  33. package/dist/lib/query/compliant-attributes/compliant-attributes.query.js +24 -0
  34. package/dist/lib/query/doctype.query.d.ts +2 -2
  35. package/dist/lib/query/doctype.query.js +2 -1
  36. package/dist/lib/query/form.query.d.ts +2 -2
  37. package/dist/lib/query/index.d.ts +7 -0
  38. package/dist/lib/query/index.js +7 -0
  39. package/dist/lib/query/operators/and-query.d.ts +8 -0
  40. package/dist/lib/query/operators/and-query.js +25 -0
  41. package/dist/lib/query/operators/operator-query.d.ts +8 -0
  42. package/dist/lib/query/operators/operator-query.js +14 -0
  43. package/dist/lib/query/operators/or-query.d.ts +8 -0
  44. package/dist/lib/query/operators/or-query.js +24 -0
  45. package/dist/lib/reference/rgaa/coverage/coverage-statement.json +56 -17
  46. package/dist/lib/reference/rgaa/rules/1-image.d.ts +0 -1
  47. package/dist/lib/reference/rgaa/rules/1-image.js +51 -77
  48. package/dist/lib/reference/rgaa/rules/11-form.d.ts +0 -1
  49. package/dist/lib/reference/rgaa/rules/11-form.js +0 -1
  50. package/dist/lib/reference/rgaa/rules/2-frame.d.ts +0 -1
  51. package/dist/lib/reference/rgaa/rules/2-frame.js +8 -7
  52. package/dist/lib/reference/rgaa/rules/3-color.d.ts +0 -1
  53. package/dist/lib/reference/rgaa/rules/3-color.js +0 -3
  54. package/dist/lib/reference/rgaa/rules/5-table.d.ts +12 -1
  55. package/dist/lib/reference/rgaa/rules/5-table.js +292 -1
  56. package/dist/lib/reference/rgaa/rules/6-link.d.ts +12 -1
  57. package/dist/lib/reference/rgaa/rules/6-link.js +147 -1
  58. package/dist/lib/reference/rgaa/rules/8-required-element.d.ts +0 -1
  59. package/dist/lib/reference/rgaa/rules/8-required-element.js +57 -9
  60. package/dist/lib/reference/rgaa/selector-helper.d.ts +40 -1
  61. package/dist/lib/reference/rgaa/selector-helper.js +82 -10
  62. package/dist/package.json +15 -4
  63. package/package.json +15 -4
@@ -1,22 +1,4 @@
1
- /*!
2
- * jQuery JavaScript Library v3.7.1
3
- * https://jquery.com/
4
- *
5
- * Copyright OpenJS Foundation and other contributors
6
- * Released under the MIT license
7
- * https://jquery.org/license
8
- *
9
- * Date: 2023-08-28T13:37Z
10
- */
11
-
12
- /**
13
- * @license
14
- * Lodash <https://lodash.com/>
15
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
16
- * Released under MIT license <https://lodash.com/license>
17
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
18
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
19
- */
1
+ /*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
20
2
 
21
3
  /** @license React v17.0.2
22
4
  * react-is.production.min.js
package/dist/CHANGELOG.md CHANGED
@@ -1,3 +1,172 @@
1
+ # [1.0.0-beta.20](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.19...a11y-v1.0.0-beta.20) (2024-03-28)
2
+
3
+
4
+ ### Features
5
+
6
+ * **deps:** update node.js to v20 ([f771f22](https://github.com/Orange-OpenSource/uuv/commit/f771f22197d7efc32bba6f8a345b5f6b2f3dd114))
7
+
8
+ # [1.0.0-beta.19](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.18...a11y-v1.0.0-beta.19) (2024-03-15)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **runner-cypress:** update dependency @cypress/webpack-preprocessor to v6 ([2e9a52b](https://github.com/Orange-OpenSource/uuv/commit/2e9a52b2cc1bfb05e96c212cdec0fd644f41d02b))
14
+
15
+ # [1.0.0-beta.18](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.17...a11y-v1.0.0-beta.18) (2024-03-10)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **runner-cypress:** update dependency @testing-library/cypress to v10 ([8ef11bf](https://github.com/Orange-OpenSource/uuv/commit/8ef11bfde65efb9ace5942113a03c06c6f8c3b6e))
21
+ * **runner-playwright:** update dependency axe-playwright to v2 ([7e3f1f4](https://github.com/Orange-OpenSource/uuv/commit/7e3f1f4793f89c9d826c341bb73f59d698c3dfa0))
22
+
23
+ # [1.0.0-beta.17](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.16...a11y-v1.0.0-beta.17) (2024-03-07)
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * fix husky migration to v9, [#530](https://github.com/Orange-OpenSource/uuv/issues/530) ([dbce11e](https://github.com/Orange-OpenSource/uuv/commit/dbce11e2c8edb8e759538eb9731fbe0ecfb06552))
29
+
30
+
31
+ ### Features
32
+
33
+ * **flutter-finder-usercentric:** initialize flutter usercentric finder, [#423](https://github.com/Orange-OpenSource/uuv/issues/423) ([cedcc3a](https://github.com/Orange-OpenSource/uuv/commit/cedcc3a8803b07a21a9fa3ca18c86d7359743ebc))
34
+ * **runner-flutter:** initialize uuv_flutter e2e cucumber library, [#423](https://github.com/Orange-OpenSource/uuv/issues/423) ([bace2f6](https://github.com/Orange-OpenSource/uuv/commit/bace2f6a6e12b48d99fb69b84e7ce930b0292d4a))
35
+
36
+ # [1.0.0-beta.16](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.15...a11y-v1.0.0-beta.16) (2024-03-04)
37
+
38
+
39
+ ### Bug Fixes
40
+
41
+ * **assistant:** update dependency @ant-design/icons to v5.3.1 ([a428304](https://github.com/Orange-OpenSource/uuv/commit/a428304f37759003424e79d93dc1d5582ef34626))
42
+ * **assistant:** update dependency antd to v5.15.0 ([cb516bc](https://github.com/Orange-OpenSource/uuv/commit/cb516bcd7bb6993c6d7de8ec3f24c7d0ce4dd8b7))
43
+ * fix semantic release ([aef0c23](https://github.com/Orange-OpenSource/uuv/commit/aef0c234009fa8eb6e6a1b63c158af7c407f318a))
44
+ * **runner-playwright:** update playwright monorepo to v1.42.1 ([d0e78f6](https://github.com/Orange-OpenSource/uuv/commit/d0e78f6c73be178e7c00bf4e88d57aef3b537a70))
45
+
46
+ ## [1.0.0-beta.15](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.14...a11y-v1.0.0-beta.15) (2024-02-26)
47
+
48
+
49
+ ### Features
50
+
51
+ * **a11y:** add rgaa criteria 8.*, [#476](https://github.com/Orange-OpenSource/uuv/issues/476) ([426184b](https://github.com/Orange-OpenSource/uuv/commit/426184b56bec5648f85dd86d54a733e445e7fdcd))
52
+
53
+
54
+ ### Bug Fixes
55
+
56
+ * **runner-playwright:** update playwright monorepo to v1.41.2 ([8791934](https://github.com/Orange-OpenSource/uuv/commit/87919348646fb4e5fefed2dc8a16a86e61e7dfc2))
57
+
58
+ ## [1.0.0-beta.14](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.13...a11y-v1.0.0-beta.14) (2024-02-25)
59
+
60
+
61
+ ### Features
62
+
63
+ * add junit xml report option, [#491](https://github.com/Orange-OpenSource/uuv/issues/491) ([b64b0b2](https://github.com/Orange-OpenSource/uuv/commit/b64b0b2a60200269f558bcf7e0c75d8a74ffc226))
64
+
65
+
66
+ ### Bug Fixes
67
+
68
+ * **runner-playwright:** update dependency @cucumber/tag-expressions to v6.1.0 ([47fb579](https://github.com/Orange-OpenSource/uuv/commit/47fb579ee50c26ed67af6390f4e678f8206b7226))
69
+
70
+ ## [1.0.0-beta.13](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.12...a11y-v1.0.0-beta.13) (2024-02-24)
71
+
72
+
73
+ ### Bug Fixes
74
+
75
+ * **assistant:** update dependency antd to v5.14.2 ([1335df6](https://github.com/Orange-OpenSource/uuv/commit/1335df676dd4641a4bda7b7f36d29d8216de0da4))
76
+ * **runner-cypress:** update dependency cypress-real-events to v1.12.0 ([55794fd](https://github.com/Orange-OpenSource/uuv/commit/55794fd04362ad2ece397d108ba400c50b152d59))
77
+
78
+ ## [1.0.0-beta.12](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.11...a11y-v1.0.0-beta.12) (2024-02-23)
79
+
80
+
81
+ ### Features
82
+
83
+ * **a11y:** add rgaa topic 6, [#457](https://github.com/Orange-OpenSource/uuv/issues/457) ([ae59c46](https://github.com/Orange-OpenSource/uuv/commit/ae59c46a8973ba4ad24d2d7479362c3f9a5b0b0b))
84
+
85
+
86
+ ### Bug Fixes
87
+
88
+ * **a11y:** fix topic 5 typo in warning message, [#451](https://github.com/Orange-OpenSource/uuv/issues/451) ([ac503f0](https://github.com/Orange-OpenSource/uuv/commit/ac503f0641574c05222967eff0babc95bbc3f5fc))
89
+ * **assistant:** update dependency @ant-design/icons to v5.3.0 ([b4b2782](https://github.com/Orange-OpenSource/uuv/commit/b4b2782cfa93290a2e3cece937c02c1b00aec938))
90
+
91
+ ## [1.0.0-beta.11](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.10...a11y-v1.0.0-beta.11) (2024-02-21)
92
+
93
+
94
+ ### Bug Fixes
95
+
96
+ * **deps:** update dependency @mdx-js/react to v3.0.1 ([e4ba234](https://github.com/Orange-OpenSource/uuv/commit/e4ba234ec2883f93e6003a7c27843a35f119281b))
97
+
98
+ ## [1.0.0-beta.10](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.9...a11y-v1.0.0-beta.10) (2024-02-15)
99
+
100
+
101
+ ### Bug Fixes
102
+
103
+ * **runner-playwright:** update dependency axe-core to v4.8.4 ([1db34e2](https://github.com/Orange-OpenSource/uuv/commit/1db34e26b498bfc83d47cfd98064faa1aa65f558))
104
+
105
+ ## [1.0.0-beta.9](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.8...a11y-v1.0.0-beta.9) (2024-02-13)
106
+
107
+
108
+ ### Bug Fixes
109
+
110
+ * update dependency multiple-cucumber-html-reporter to v3.6.2 ([95d85c3](https://github.com/Orange-OpenSource/uuv/commit/95d85c3f29ff261232f75c83175d795b63766a89))
111
+
112
+ ## [1.0.0-beta.8](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.7...a11y-v1.0.0-beta.8) (2024-02-13)
113
+
114
+
115
+ ### Features
116
+
117
+ * **a11y:** add rgaa criteria 5.1 to 5.5, [#451](https://github.com/Orange-OpenSource/uuv/issues/451) ([fa3b369](https://github.com/Orange-OpenSource/uuv/commit/fa3b3693e102b54e1d72321aba573e66c864f4e3))
118
+ * **a11y:** add rgaa criteria 5.6 to 5.8, [#451](https://github.com/Orange-OpenSource/uuv/issues/451) ([9cdf4ad](https://github.com/Orange-OpenSource/uuv/commit/9cdf4ad0e5ba16d7b8ddb90e014d96fc741acc17))
119
+
120
+ ## [1.0.0-beta.7](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.6...a11y-v1.0.0-beta.7) (2024-01-24)
121
+
122
+
123
+ ### Features
124
+
125
+ * **a11y:** add rgaa topic 2, [#432](https://github.com/Orange-OpenSource/uuv/issues/432) ([#450](https://github.com/Orange-OpenSource/uuv/issues/450)) ([231d95b](https://github.com/Orange-OpenSource/uuv/commit/231d95b48ecfbeb0c86f44d0de0ca8c68df7b9f1))
126
+
127
+ ## [1.0.0-beta.6](https://github.com/Orange-OpenSource/uuv/compare/a11y-v1.0.0-beta.5...a11y-v1.0.0-beta.6) (2024-01-23)
128
+
129
+
130
+ ### Features
131
+
132
+ * **a11y:** add RGAA 1.1.6 and 1.1.3, [#429](https://github.com/Orange-OpenSource/uuv/issues/429) ([0e65889](https://github.com/Orange-OpenSource/uuv/commit/0e65889b479651c27e16c29fdb8e5123fe689f03))
133
+
134
+
135
+ ### Bug Fixes
136
+
137
+ * **runner-playwright:** update dependency axe-core to v4.8.3 ([4623485](https://github.com/Orange-OpenSource/uuv/commit/46234851677cf0e5f0479fe30bc786ae2a607f1e))
138
+
139
+ ## [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)
140
+
141
+
142
+ ### Bug Fixes
143
+
144
+ * **a11y:** update dependency @testing-library/dom to v9.3.4 ([368b6b4](https://github.com/Orange-OpenSource/uuv/commit/368b6b4210f83d2da7695a0bfedd8ac593df171a))
145
+ * **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))
146
+ * **deps:** update dependency @easyops-cn/docusaurus-search-local to v0.40.1 ([d5ed3d7](https://github.com/Orange-OpenSource/uuv/commit/d5ed3d75f44e2b83af81fcd7227521dea00371e6))
147
+
148
+ ## [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)
149
+
150
+
151
+ ### Features
152
+
153
+ * **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))
154
+
155
+ ## [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)
156
+
157
+
158
+ ### Features
159
+
160
+ * **a11y:** reduce @uuv/a11y bundle size, [#330](https://github.com/Orange-OpenSource/uuv/issues/330) ([139b85a](https://github.com/Orange-OpenSource/uuv/commit/139b85a56e2ce4b8f370df4f6d410a9a1807e3b6))
161
+
162
+ ## [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)
163
+
164
+
165
+ ### Bug Fixes
166
+
167
+ * **a11y:** fix post first publish, [#330](https://github.com/Orange-OpenSource/uuv/issues/330) ([76cf65b](https://github.com/Orange-OpenSource/uuv/commit/76cf65ba219f6128c58ecdec608d3cb4fe72bcc9))
168
+ * **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))
169
+
1
170
  ## 1.0.0-beta.1 (2024-01-08)
2
171
 
3
172
 
@@ -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 and export it `index.ts` of same directory.**
44
+
45
+
46
+ 4. Create or enhance the automated topic test file in the directory `a11y/test/checker/**`.
package/dist/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
 
@@ -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 |
@@ -18,13 +18,14 @@ class Engine {
18
18
  observer.complete();
19
19
  });
20
20
  }
21
- getRuleResult(rule, foundElements) {
21
+ getRuleResult(rule, queryResults) {
22
22
  if (rule.check === model_1.RuleCheckEnum.MANUAL) {
23
- return this.buildResultForManualCheck(rule, foundElements);
23
+ return this.buildResultForManualCheck(rule, queryResults);
24
24
  }
25
25
  else {
26
26
  // Then we are considering rule as RuleCheckEnum.AUTO
27
- return this.buildResultForAutoCheck(rule, foundElements);
27
+ const domNodes = queryResults.map((element) => element.domNode);
28
+ return this.buildResultForAutoCheck(rule, domNodes);
28
29
  }
29
30
  }
30
31
  buildResultForAutoCheck(rule, $el) {
@@ -62,30 +63,41 @@ class Engine {
62
63
  }
63
64
  return a11YRuleresult;
64
65
  }
65
- buildResultForManualCheck(rule, $el) {
66
- const a11YRuleresult = new model_1.A11yRuleResult(this.targetUrl, rule);
67
- const validation = a11YRuleresult.getOrAddValidation(rule.criterion);
66
+ buildResultForManualCheck(rule, queryResults) {
67
+ const a11YRuleResult = new model_1.A11yRuleResult(this.targetUrl, rule);
68
+ const validation = a11YRuleResult.getOrAddValidation(rule.criterion);
68
69
  validation.status = model_1.A11yResultStatus.SUCCESS;
69
- for (let i = 0; i < $el.length; i++) {
70
- const selector = this.getSelector($el[i]);
70
+ for (const element of queryResults) {
71
+ const domNode = element.domNode;
72
+ const selector = this.getSelector(domNode);
71
73
  const attributesToCheck = [];
72
74
  rule.attributes.forEach((attribute) => {
73
- const attributeFilledWithInformation = $el[i].getAttribute(attribute);
74
- if (attributeFilledWithInformation) {
75
- attributesToCheck.push(` ${attribute}=${attributeFilledWithInformation}`);
75
+ const childData = attribute.split(":");
76
+ if (childData.length > 1) {
77
+ domNode.childNodes.forEach((childNode) => {
78
+ if (childNode.nodeName === childData[1]) {
79
+ attributesToCheck.push(`${attribute}=${childNode.textContent}`);
80
+ }
81
+ });
82
+ }
83
+ else {
84
+ const attributeFilledWithInformation = domNode.getAttribute(attribute);
85
+ if (attributeFilledWithInformation) {
86
+ attributesToCheck.push(`${attribute}=${attributeFilledWithInformation}`);
87
+ }
76
88
  }
77
89
  });
78
- const manualValidation = a11YRuleresult.getOrAddValidation(rule.criterion);
90
+ const manualValidation = a11YRuleResult.getOrAddValidation(rule.criterion);
79
91
  manualValidation.status = model_1.A11yResultStatus.MANUAL;
80
92
  manualValidation.nodesToCheckManually.push({
81
- node: $el[i],
93
+ node: element,
82
94
  selector: selector,
83
- attributes: attributesToCheck.toString(),
84
- html: $el[i].outerHTML,
95
+ attributes: attributesToCheck.join(", "),
96
+ html: domNode.outerHTML,
85
97
  help: rule.id ? `${this.reference.getRuleUrl(rule.id)}` : ""
86
98
  });
87
99
  }
88
- return a11YRuleresult;
100
+ return a11YRuleResult;
89
101
  }
90
102
  getSelector(element) {
91
103
  const path = [];
@@ -1,4 +1,4 @@
1
- export * from "./checker";
2
1
  export * from "./reference";
2
+ export * from "./checker";
3
3
  export * from "./result";
4
4
  export * from "./rule";
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./checker"), exports);
18
17
  __exportStar(require("./reference"), exports);
18
+ __exportStar(require("./checker"), exports);
19
19
  __exportStar(require("./result"), exports);
20
20
  __exportStar(require("./rule"), exports);
@@ -1,5 +1,6 @@
1
1
  import { A11yRule } from "./rule";
2
2
  import { A11yReference } from "./reference";
3
+ import { QueryResult } from "../query";
3
4
  export declare enum A11yResultStatus {
4
5
  UNKNOWN = "unknown",
5
6
  SUCCESS = "success",
@@ -12,7 +13,7 @@ export interface NonCompliantNode {
12
13
  html?: string;
13
14
  }
14
15
  export interface NodeToCheckManually {
15
- node: HTMLElement;
16
+ node: QueryResult;
16
17
  selector: string;
17
18
  attributes: string;
18
19
  html: string;