@uuv/a11y 0.0.1 → 1.0.0-beta.10

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 (104) hide show
  1. package/CHANGELOG.md +123 -0
  2. package/CONTRIBUTING.md +46 -0
  3. package/LICENSE +1 -1
  4. package/README.md +49 -69
  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 +116 -0
  9. package/dist/CONTRIBUTING.md +46 -0
  10. package/dist/README.md +49 -69
  11. package/dist/STRUCTURE.md +10 -0
  12. package/dist/index.d.ts +1 -1
  13. package/dist/index.js +17 -17
  14. package/dist/lib/engine/engine.d.ts +12 -12
  15. package/dist/lib/engine/engine.js +135 -123
  16. package/dist/lib/index.d.ts +3 -3
  17. package/dist/lib/index.js +19 -19
  18. package/dist/lib/model/checker.d.ts +14 -14
  19. package/dist/lib/model/checker.js +35 -35
  20. package/dist/lib/model/index.d.ts +4 -4
  21. package/dist/lib/model/index.js +20 -20
  22. package/dist/lib/model/reference.d.ts +55 -55
  23. package/dist/lib/model/reference.js +66 -66
  24. package/dist/lib/model/result.d.ts +58 -57
  25. package/dist/lib/model/result.js +144 -144
  26. package/dist/lib/model/rule.d.ts +92 -99
  27. package/dist/lib/model/rule.js +51 -53
  28. package/dist/lib/query/00-query.d.ts +9 -4
  29. package/dist/lib/query/00-query.js +12 -2
  30. package/dist/lib/query/accessible-name.query.d.ts +8 -8
  31. package/dist/lib/query/accessible-name.query.js +31 -34
  32. package/dist/lib/query/by-role.query.d.ts +9 -8
  33. package/dist/lib/query/by-role.query.js +43 -27
  34. package/dist/lib/query/by-sibling.query.d.ts +12 -0
  35. package/dist/lib/query/by-sibling.query.js +100 -0
  36. package/dist/lib/query/by-tag.query.d.ts +7 -7
  37. package/dist/lib/query/by-tag.query.js +19 -20
  38. package/dist/lib/query/compliant-attributes/attribut-specification.d.ts +25 -0
  39. package/dist/lib/query/compliant-attributes/attribut-specification.js +71 -0
  40. package/dist/lib/query/compliant-attributes/attribute-checker.d.ts +35 -0
  41. package/dist/lib/query/compliant-attributes/attribute-checker.js +55 -0
  42. package/dist/lib/query/compliant-attributes/compliant-attributes.query.d.ts +9 -0
  43. package/dist/lib/query/compliant-attributes/compliant-attributes.query.js +24 -0
  44. package/dist/lib/query/doctype.query.d.ts +5 -5
  45. package/dist/lib/query/doctype.query.js +16 -15
  46. package/dist/lib/query/form.query.d.ts +8 -8
  47. package/dist/lib/query/form.query.js +87 -87
  48. package/dist/lib/query/index.d.ts +13 -6
  49. package/dist/lib/query/index.js +29 -22
  50. package/dist/lib/query/operators/and-query.d.ts +8 -0
  51. package/dist/lib/query/operators/and-query.js +25 -0
  52. package/dist/lib/query/operators/operator-query.d.ts +8 -0
  53. package/dist/lib/query/operators/operator-query.js +14 -0
  54. package/dist/lib/query/operators/or-query.d.ts +8 -0
  55. package/dist/lib/query/operators/or-query.js +24 -0
  56. package/dist/lib/reference/alix/alix-checker.js +82 -82
  57. package/dist/lib/reference/alix/alix-rules.js +1028 -1028
  58. package/dist/lib/reference/alix/index.js +3 -3
  59. package/dist/lib/reference/index.d.ts +1 -1
  60. package/dist/lib/reference/index.js +18 -18
  61. package/dist/lib/reference/rgaa/common.d.ts +2 -2
  62. package/dist/lib/reference/rgaa/common.js +5 -5
  63. package/dist/lib/reference/rgaa/coverage/coverage-helper.d.ts +2 -2
  64. package/dist/lib/reference/rgaa/coverage/coverage-helper.js +100 -100
  65. package/dist/lib/reference/rgaa/coverage/coverage-statement.json +110 -90
  66. package/dist/lib/reference/rgaa/index.d.ts +2 -2
  67. package/dist/lib/reference/rgaa/index.js +18 -18
  68. package/dist/lib/reference/rgaa/rgaa-checker.d.ts +8 -8
  69. package/dist/lib/reference/rgaa/rgaa-checker.js +31 -31
  70. package/dist/lib/reference/rgaa/rgaa-reference.d.ts +2 -2
  71. package/dist/lib/reference/rgaa/rgaa-reference.js +44 -44
  72. package/dist/lib/reference/rgaa/rgaa_4.1.criteres.json +4144 -4144
  73. package/dist/lib/reference/rgaa/rules/1-image.d.ts +13 -14
  74. package/dist/lib/reference/rgaa/rules/1-image.js +618 -644
  75. package/dist/lib/reference/rgaa/rules/10-display.d.ts +2 -2
  76. package/dist/lib/reference/rgaa/rules/10-display.js +3 -3
  77. package/dist/lib/reference/rgaa/rules/11-form.d.ts +13 -14
  78. package/dist/lib/reference/rgaa/rules/11-form.js +15 -16
  79. package/dist/lib/reference/rgaa/rules/12-navigation.d.ts +2 -2
  80. package/dist/lib/reference/rgaa/rules/12-navigation.js +3 -3
  81. package/dist/lib/reference/rgaa/rules/13-visit.d.ts +2 -2
  82. package/dist/lib/reference/rgaa/rules/13-visit.js +3 -3
  83. package/dist/lib/reference/rgaa/rules/2-frame.d.ts +13 -14
  84. package/dist/lib/reference/rgaa/rules/2-frame.js +35 -34
  85. package/dist/lib/reference/rgaa/rules/3-color.d.ts +13 -14
  86. package/dist/lib/reference/rgaa/rules/3-color.js +47 -50
  87. package/dist/lib/reference/rgaa/rules/4-multimedia.d.ts +2 -2
  88. package/dist/lib/reference/rgaa/rules/4-multimedia.js +3 -3
  89. package/dist/lib/reference/rgaa/rules/5-table.d.ts +13 -2
  90. package/dist/lib/reference/rgaa/rules/5-table.js +294 -3
  91. package/dist/lib/reference/rgaa/rules/6-link.d.ts +2 -2
  92. package/dist/lib/reference/rgaa/rules/6-link.js +3 -3
  93. package/dist/lib/reference/rgaa/rules/7-script.d.ts +2 -2
  94. package/dist/lib/reference/rgaa/rules/7-script.js +3 -3
  95. package/dist/lib/reference/rgaa/rules/8-required-element.d.ts +13 -14
  96. package/dist/lib/reference/rgaa/rules/8-required-element.js +72 -78
  97. package/dist/lib/reference/rgaa/rules/9-structure.d.ts +2 -2
  98. package/dist/lib/reference/rgaa/rules/9-structure.js +3 -3
  99. package/dist/lib/reference/rgaa/selector-helper.d.ts +56 -17
  100. package/dist/lib/reference/rgaa/selector-helper.js +105 -33
  101. package/dist/package.json +15 -3
  102. package/docs/diagram-a11y-rgaa.excalidraw +1654 -0
  103. package/docs/diagram-a11y-rgaa.png +0 -0
  104. package/package.json +15 -3
package/CHANGELOG.md ADDED
@@ -0,0 +1,123 @@
1
+ ## [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)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **runner-playwright:** update dependency axe-core to v4.8.4 ([1db34e2](https://github.com/Orange-OpenSource/uuv/commit/1db34e26b498bfc83d47cfd98064faa1aa65f558))
7
+
8
+ ## [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)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * update dependency multiple-cucumber-html-reporter to v3.6.2 ([95d85c3](https://github.com/Orange-OpenSource/uuv/commit/95d85c3f29ff261232f75c83175d795b63766a89))
14
+
15
+ ## [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)
16
+
17
+
18
+ ### Features
19
+
20
+ * **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))
21
+ * **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))
22
+
23
+ ## [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)
24
+
25
+
26
+ ### Features
27
+
28
+ * **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))
29
+
30
+ ## [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)
31
+
32
+
33
+ ### Features
34
+
35
+ * **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))
36
+
37
+
38
+ ### Bug Fixes
39
+
40
+ * **runner-playwright:** update dependency axe-core to v4.8.3 ([4623485](https://github.com/Orange-OpenSource/uuv/commit/46234851677cf0e5f0479fe30bc786ae2a607f1e))
41
+
42
+ ## [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)
43
+
44
+
45
+ ### Bug Fixes
46
+
47
+ * **a11y:** update dependency @testing-library/dom to v9.3.4 ([368b6b4](https://github.com/Orange-OpenSource/uuv/commit/368b6b4210f83d2da7695a0bfedd8ac593df171a))
48
+ * **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))
49
+ * **deps:** update dependency @easyops-cn/docusaurus-search-local to v0.40.1 ([d5ed3d7](https://github.com/Orange-OpenSource/uuv/commit/d5ed3d75f44e2b83af81fcd7227521dea00371e6))
50
+
51
+ ## [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)
52
+
53
+
54
+ ### Features
55
+
56
+ * **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))
57
+
58
+ ## [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)
59
+
60
+
61
+ ### Features
62
+
63
+ * **a11y:** reduce @uuv/a11y bundle size, [#330](https://github.com/Orange-OpenSource/uuv/issues/330) ([139b85a](https://github.com/Orange-OpenSource/uuv/commit/139b85a56e2ce4b8f370df4f6d410a9a1807e3b6))
64
+
65
+ ## [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)
66
+
67
+
68
+ ### Bug Fixes
69
+
70
+ * **a11y:** fix post first publish, [#330](https://github.com/Orange-OpenSource/uuv/issues/330) ([76cf65b](https://github.com/Orange-OpenSource/uuv/commit/76cf65ba219f6128c58ecdec608d3cb4fe72bcc9))
71
+ * **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))
72
+
73
+ ## 1.0.0-beta.1 (2024-01-08)
74
+
75
+
76
+ ### Features
77
+
78
+ * **a11y:** initialize @uuv/a11y lib, [#330](https://github.com/Orange-OpenSource/uuv/issues/330) ([3c27ac5](https://github.com/Orange-OpenSource/uuv/commit/3c27ac5a1698a407289123aac85e500508e2d8c6))
79
+ * add accessibility tab and arrows, [#166](https://github.com/Orange-OpenSource/uuv/issues/166) ([9b926cd](https://github.com/Orange-OpenSource/uuv/commit/9b926cd322049860a5f06810027dbeb7efe6d795))
80
+ * **assistant:** setting up electron, fixes [#132](https://github.com/Orange-OpenSource/uuv/issues/132) ([6d6e99c](https://github.com/Orange-OpenSource/uuv/commit/6d6e99cbbdb498e1d5f24a0386e52ae38fa1b161))
81
+ * **docs:** add autocompletion searchfield to steps definition page, [#255](https://github.com/Orange-OpenSource/uuv/issues/255) ([a0323ee](https://github.com/Orange-OpenSource/uuv/commit/a0323eec01a6351f9b60399398d145cb2bc86779))
82
+ * **runner-playwright:** add error details and screenshot to report, fixes [#110](https://github.com/Orange-OpenSource/uuv/issues/110) ([3c4a3cd](https://github.com/Orange-OpenSource/uuv/commit/3c4a3cd192b90242dd07bbdc4bb3ece780ee0c40))
83
+ * **runner-playwright:** add tags option for runner-playwright, [#416](https://github.com/Orange-OpenSource/uuv/issues/416) ([8787581](https://github.com/Orange-OpenSource/uuv/commit/87875818114bbf77ff4b35ff8ccb26d525eba450))
84
+ * **runner-playwright:** regenerate .spec when update, add or remove a .feature in open mode, [#236](https://github.com/Orange-OpenSource/uuv/issues/236) ([8a2599a](https://github.com/Orange-OpenSource/uuv/commit/8a2599a3fa4e577b9e626929537f2cc5f8e57bcc))
85
+ * setup assistant-electron package, [#132](https://github.com/Orange-OpenSource/uuv/issues/132) ([76d69c2](https://github.com/Orange-OpenSource/uuv/commit/76d69c2b5d311b40cb42c9511d224d7911133e10))
86
+
87
+
88
+ ### Bug Fixes
89
+
90
+ * **assistant:** fix assistant css problem, [#120](https://github.com/Orange-OpenSource/uuv/issues/120) ([026d66a](https://github.com/Orange-OpenSource/uuv/commit/026d66ad6ad7e9090282f1734335c5a7b1e417c6))
91
+ * **assistant:** moving test app in component ([5bdc75b](https://github.com/Orange-OpenSource/uuv/commit/5bdc75b9ae4aec75f7a944513af0d57a4107cefd))
92
+ * **deps:** update dependency @cucumber/cucumber to v9.3.0 ([212250b](https://github.com/Orange-OpenSource/uuv/commit/212250be47e040e34de18af33986a1f26f7b00a2))
93
+ * **deps:** update dependency @cucumber/cucumber to v9.6.0 ([d0ac7ca](https://github.com/Orange-OpenSource/uuv/commit/d0ac7ca26b3d9d1fddd17d7cb6c7034ff640e483))
94
+ * **deps:** update dependency @cucumber/cucumber to v9.6.0 ([52a3e4c](https://github.com/Orange-OpenSource/uuv/commit/52a3e4c14fbe3b87b9b7f97b56a3e437f71f36bf))
95
+ * **deps:** update dependency @cypress/webpack-preprocessor to v5.17.1 ([9570e56](https://github.com/Orange-OpenSource/uuv/commit/9570e5689387a2c770994576d779a34ff242ca76))
96
+ * **deps:** update dependency antd to v5.11.4 ([33a0cf4](https://github.com/Orange-OpenSource/uuv/commit/33a0cf4d6973e8bcc50c805a091b11deaa9afe72))
97
+ * **deps:** update dependency antd to v5.12.2 ([0c472ee](https://github.com/Orange-OpenSource/uuv/commit/0c472eef7a05ed343c6aa9576092ba001c9ffb00))
98
+ * **deps:** update dependency antd to v5.7.3 ([452fc3c](https://github.com/Orange-OpenSource/uuv/commit/452fc3c3861509e8aba46b3efa248f365bbfb747))
99
+ * **deps:** update dependency axe-core to v4.7.2 ([965b9dc](https://github.com/Orange-OpenSource/uuv/commit/965b9dcb1445c369c770ed056ab990e3f966197b))
100
+ * **deps:** update dependency axe-core to v4.8.2 ([66b7dc2](https://github.com/Orange-OpenSource/uuv/commit/66b7dc2fbd63a9d4429964abb50f63a88e06e99b))
101
+ * **deps:** update dependency cypress to v12.17.2 ([49a3012](https://github.com/Orange-OpenSource/uuv/commit/49a3012f7ebf0e6ecc879d21ff86147938967607))
102
+ * **deps:** update dependency cypress to v12.17.3 ([35c812b](https://github.com/Orange-OpenSource/uuv/commit/35c812bdabd1a3a2d27e972d3bb5c9323497c449))
103
+ * **deps:** update dependency cypress to v12.17.4 ([998b754](https://github.com/Orange-OpenSource/uuv/commit/998b754038941de8b035abbd47800d45b1dac022))
104
+ * **deps:** update dependency cypress-axe to v1.5.0 ([816775f](https://github.com/Orange-OpenSource/uuv/commit/816775f89ec46d385e3fb6d8322a70165c7e5ea5))
105
+ * **deps:** update dependency cypress-real-events to v1.10.1 ([f60978d](https://github.com/Orange-OpenSource/uuv/commit/f60978da4bdd76483bcb2479324ccbbf3b36d87b))
106
+ * **deps:** update dependency cypress-real-events to v1.10.3 ([9e3c991](https://github.com/Orange-OpenSource/uuv/commit/9e3c9914420c6d527f7ad8b0017a0f8e26250f86))
107
+ * **deps:** update dependency cypress-real-events to v1.11.0 ([1694807](https://github.com/Orange-OpenSource/uuv/commit/169480777dc4c87f14a2deb5c10beb9cb0e43238))
108
+ * **deps:** update dependency figlet to v1.7.0 ([8fbde74](https://github.com/Orange-OpenSource/uuv/commit/8fbde7405cef7576b1cd4151785be463a823e6ef))
109
+ * **deps:** update dependency multiple-cucumber-html-reporter to v3.5.0 ([b8a9dab](https://github.com/Orange-OpenSource/uuv/commit/b8a9dabed814d5cea192be9aeefdeb8af93249ce))
110
+ * **deps:** update dependency nanoid to v3.3.6 ([82fa0c3](https://github.com/Orange-OpenSource/uuv/commit/82fa0c31207a9004a8b365fe0e92fcaac38e1be3))
111
+ * **deps:** update dependency nanoid to v3.3.7 ([7d1d60e](https://github.com/Orange-OpenSource/uuv/commit/7d1d60e32fd7f799c61beaace586a9869791f55b))
112
+ * **deps:** update dependency primereact to v9.6.3 ([f52ee84](https://github.com/Orange-OpenSource/uuv/commit/f52ee84daccc1380586e2da95d10592f9dd87e8b))
113
+ * **deps:** update dependency primereact to v9.6.4 ([ed3e76c](https://github.com/Orange-OpenSource/uuv/commit/ed3e76c6da6af1d9c17f98e0802ffbb1a46124a4))
114
+ * **deps:** update dependency ts-node to v10.9.2 ([b5c5ebb](https://github.com/Orange-OpenSource/uuv/commit/b5c5ebbc1eb9556d66c9494d45b089018580ba70))
115
+ * **deps:** update dependency tslib to v2.6.2 ([f43d897](https://github.com/Orange-OpenSource/uuv/commit/f43d8972746b85a386320ad67b80d9c7aa7bc313))
116
+ * **deps:** update docusaurus monorepo to v2.4.1 ([9c0f5fb](https://github.com/Orange-OpenSource/uuv/commit/9c0f5fb6a641f54fc97d0940acfebdfb5106a790))
117
+ * **deps:** update docusaurus monorepo to v2.4.3 ([9e7ccf7](https://github.com/Orange-OpenSource/uuv/commit/9e7ccf78176e5b38da147d6d26097730c7859da8))
118
+ * prototype pollution in lodash - cve-2019-10744, [#219](https://github.com/Orange-OpenSource/uuv/issues/219) ([4b16741](https://github.com/Orange-OpenSource/uuv/commit/4b16741d53f814958ad0ee6d761e82d92374e5e8))
119
+ * release 1.4.0 package.json and rchangelog was not updated, [#117](https://github.com/Orange-OpenSource/uuv/issues/117) ([cd7723d](https://github.com/Orange-OpenSource/uuv/commit/cd7723d6d790dd5fd928a5d9d41bfd075159378a))
120
+ * **runner-cypress:** relocate cypress-real-events dependency into project package.json, [#213](https://github.com/Orange-OpenSource/uuv/issues/213) ([ffca8dd](https://github.com/Orange-OpenSource/uuv/commit/ffca8dd21d3858d0020f6bf1974437bbf38fe6c4))
121
+ * **runner-playwright:** fix workspace lint during ci, [#108](https://github.com/Orange-OpenSource/uuv/issues/108) ([a3ac0d6](https://github.com/Orange-OpenSource/uuv/commit/a3ac0d68d27c34f36237b6f74b94e160b7cde9b8))
122
+ * **runner-playwright:** regenerate package-lock.json to fix lint, [#109](https://github.com/Orange-OpenSource/uuv/issues/109) ([70044df](https://github.com/Orange-OpenSource/uuv/commit/70044dfd9efb2c6776a85cadd18966610d2d61f2))
123
+ * **runner-playwright:** update @cucumber/cucumber dep version, [#93](https://github.com/Orange-OpenSource/uuv/issues/93) ([a891a70](https://github.com/Orange-OpenSource/uuv/commit/a891a70daad1cb5d7d34f25097a31d89f92b92c6))
@@ -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/LICENSE CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  MIT License
4
4
 
5
- Copyright (c) 2023 Orange
5
+ Copyright (c) 2024 Orange
6
6
 
7
7
  Permission is hereby granted, free of charge, to any person obtaining a copy of
8
8
  this software and associated documentation files (the "Software"), to deal in
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,77 +113,57 @@ 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"
177
- }
178
- }
179
- }
180
- """
181
- ```
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 partial result
130
+ When I visit path "https://e2e-test-quest.github.io/simple-webapp/a11y-test.html"
131
+ Then I should have the following partial result based on the rgaa reference
132
+ """json
133
+ {
134
+ "status": "error",
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).
182
160
  3. Then execute your tests :
183
161
  ```shell
184
162
  npx uuv e2e
185
163
  ```
186
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).
187
167
 
188
168
  ## License
189
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 |