@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
@@ -1,3 +1,294 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = [];
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const model_1 = require("../../../model");
4
+ const query_1 = require("../../../query");
5
+ const selector_helper_1 = require("../selector-helper");
6
+ exports.default = [
7
+ model_1.AutoCheckA11yRule.from({
8
+ criterion: "5.1",
9
+ wcag: "1.3.1 A",
10
+ id: "5.1.1",
11
+ elementType: "table",
12
+ query: new query_1.CompliantAttributesQuery(new query_1.ByTagQuery(selector_helper_1.table.noCaption.buildSelector(selector_helper_1.table.selector.complex, "")), [
13
+ query_1.AttributeChecker.emptyAttribute("summary"),
14
+ query_1.AttributeChecker.emptyHtmlNodeTargetedByTheAttribute("aria-describedby"),
15
+ ]),
16
+ description: "Table tag without summary",
17
+ help: "set a summary to table"
18
+ }),
19
+ model_1.AutoCheckA11yRule.from({
20
+ criterion: "5.1",
21
+ wcag: "1.3.1 A",
22
+ id: "5.1.1",
23
+ elementType: "table",
24
+ query: new query_1.CompliantAttributesQuery(new query_1.ByTagQuery(selector_helper_1.table.noCaption.buildSelector(selector_helper_1.table.hasComplexHeader.buildSelector([], "table"), "")), [
25
+ query_1.AttributeChecker.emptyHtmlNodeTargetedByTheAttribute("aria-describedby"),
26
+ ]),
27
+ description: "Element with role table without summary",
28
+ help: "set a summary to table"
29
+ }),
30
+ model_1.ManualCheckA11yRule.from({
31
+ criterion: "5.2",
32
+ wcag: "1.3.1 A",
33
+ id: "5.2.1",
34
+ elementType: "table",
35
+ query: new query_1.ByTagQuery([
36
+ ...selector_helper_1.table.caption.buildSelector(selector_helper_1.table.selector.complex, ""),
37
+ ...selector_helper_1.table.summary.buildSelector(selector_helper_1.table.selector.complex, ""),
38
+ ...selector_helper_1.table.ariaDescribedBy.buildSelector(selector_helper_1.table.selector.complex, ""),
39
+ ...selector_helper_1.table.caption.buildSelector(selector_helper_1.table.hasComplexHeader.buildSelector([], "table"), ""),
40
+ ...selector_helper_1.table.summary.buildSelector(selector_helper_1.table.hasComplexHeader.buildSelector([], "table"), ""),
41
+ ...selector_helper_1.table.ariaDescribedBy.buildSelector(selector_helper_1.table.hasComplexHeader.buildSelector([], "table"), "")
42
+ ]),
43
+ description: "if present, attributes summary(before html5), aria-describedby or child tag <caption> must be relevant",
44
+ attributes: [
45
+ "summary",
46
+ "aria-describedby",
47
+ "child:caption"
48
+ ],
49
+ help: "adapt these attributes to be relevant"
50
+ }),
51
+ model_1.ManualCheckA11yRule.from({
52
+ criterion: "5.3",
53
+ wcag: "1.3.2 A, 4.1.2 A",
54
+ id: "5.3.1",
55
+ elementType: "table",
56
+ query: new query_1.ByTagQuery([
57
+ selector_helper_1.table.selector.withFormatting,
58
+ ]),
59
+ description: "table with presentation role must have revelant content",
60
+ attributes: [
61
+ "child:td"
62
+ ],
63
+ help: "adapt these <td> children content to be relevant"
64
+ }),
65
+ model_1.AutoCheckA11yRule.from({
66
+ criterion: "5.4",
67
+ wcag: "1.3.1 A",
68
+ id: "5.4.1",
69
+ elementType: "table",
70
+ query: new query_1.CompliantAttributesQuery(new query_1.ByTagQuery([
71
+ ...selector_helper_1.table.noCaption.buildSelector([selector_helper_1.table.selector.withData], "table"),
72
+ ]), [
73
+ query_1.AttributeChecker.emptyAttribute("title"),
74
+ query_1.AttributeChecker.emptyAttribute("aria-label"),
75
+ query_1.AttributeChecker.emptyHtmlNodeTargetedByTheAttribute("aria-labelledby"),
76
+ ]),
77
+ description: "table must have title",
78
+ attributes: [
79
+ "child:caption",
80
+ "title",
81
+ "aria-label",
82
+ "aria-labelledby"
83
+ ],
84
+ help: "set one of these attributes"
85
+ }),
86
+ model_1.ManualCheckA11yRule.from({
87
+ criterion: "5.5",
88
+ wcag: "1.3.1 A",
89
+ id: "5.5.1",
90
+ elementType: "table",
91
+ query: new query_1.ByTagQuery([
92
+ ...selector_helper_1.table.caption.buildSelector([selector_helper_1.table.selector.withData], "table"),
93
+ ...selector_helper_1.table.title.buildSelector([selector_helper_1.table.selector.withData], "table"),
94
+ ...selector_helper_1.table.ariaLabel.buildSelector([selector_helper_1.table.selector.withData], "table"),
95
+ ...selector_helper_1.table.ariaLabelledBy.buildSelector([selector_helper_1.table.selector.withData], "table"),
96
+ ]),
97
+ description: "table must have a revelant title",
98
+ attributes: [
99
+ "child:caption",
100
+ "title",
101
+ "aria-label",
102
+ "aria-labelledby"
103
+ ],
104
+ help: "adapt one of these attributes to be revelant"
105
+ }),
106
+ model_1.ManualCheckA11yRule.from({
107
+ criterion: "5.6",
108
+ wcag: "1.3.1 A",
109
+ id: "5.6.1",
110
+ elementType: "table",
111
+ query: new query_1.ByTagQuery([
112
+ selector_helper_1.table.selector.withData, "[role=table]"
113
+ ]),
114
+ description: "table column header must be set properly",
115
+ help: "each table column header must be set with tag <th> or role=\"columnheader\""
116
+ }),
117
+ model_1.ManualCheckA11yRule.from({
118
+ criterion: "5.6",
119
+ wcag: "1.3.1 A",
120
+ id: "5.6.2",
121
+ elementType: "table",
122
+ query: new query_1.ByTagQuery([
123
+ selector_helper_1.table.selector.withData, "[role=table]"
124
+ ]),
125
+ description: "table line header must be set properly",
126
+ help: "each table line header must be set with tag <th> or role=\"rowheader\""
127
+ }),
128
+ model_1.ManualCheckA11yRule.from({
129
+ criterion: "5.6",
130
+ wcag: "1.3.1 A",
131
+ id: "5.6.3",
132
+ elementType: "table",
133
+ query: new query_1.ByTagQuery([
134
+ selector_helper_1.table.selector.withData, "[role=table]"
135
+ ]),
136
+ description: "each header does not apply to the entire row or column must be set properly"
137
+ }),
138
+ model_1.ManualCheckA11yRule.from({
139
+ criterion: "5.6",
140
+ wcag: "1.3.1 A",
141
+ id: "5.6.4",
142
+ elementType: "table",
143
+ query: new query_1.ByTagQuery([
144
+ selector_helper_1.table.selector.withData, "[role=table]"
145
+ ]),
146
+ description: "each cell associated with several headers structured using a <th> or <td> tag"
147
+ }),
148
+ model_1.AutoCheckA11yRule.from({
149
+ criterion: "5.7",
150
+ wcag: "1.3.1 A",
151
+ id: "5.7.1",
152
+ elementType: "table",
153
+ query: new query_1.CompliantAttributesQuery(new query_1.ByTagQuery([
154
+ ...selector_helper_1.table.thColumnHeader.buildSelector([selector_helper_1.table.selector.withData], "table"),
155
+ ]), [
156
+ query_1.AttributeChecker.notUniqueId(),
157
+ query_1.AttributeChecker.emptyAttribute("scope"),
158
+ query_1.AttributeChecker.notEquals("role", ["rowheader", "columnheader"])
159
+ ]),
160
+ description: "Table column header attributes",
161
+ help: "Correctly set table column header attributes"
162
+ }),
163
+ model_1.AutoCheckA11yRule.from({
164
+ criterion: "5.7",
165
+ wcag: "1.3.1 A",
166
+ id: "5.7.1",
167
+ elementType: "table",
168
+ query: new query_1.CompliantAttributesQuery(new query_1.ByTagQuery([
169
+ ...selector_helper_1.table.thRowHeader.buildSelector([selector_helper_1.table.selector.withData], "table"),
170
+ ]), [
171
+ query_1.AttributeChecker.notUniqueId(),
172
+ query_1.AttributeChecker.emptyAttribute("scope"),
173
+ query_1.AttributeChecker.notEquals("role", ["rowheader", "columnheader"])
174
+ ]),
175
+ description: "Table row header attributes",
176
+ help: "Correctly set table row header attributes"
177
+ }),
178
+ model_1.AutoCheckA11yRule.from({
179
+ criterion: "5.7",
180
+ wcag: "1.3.1 A",
181
+ id: "5.7.2",
182
+ elementType: "table",
183
+ query: new query_1.CompliantAttributesQuery(new query_1.ByTagQuery([
184
+ ...selector_helper_1.table.thColumnHeader.buildSelector([selector_helper_1.table.selector.withData], "table"),
185
+ ]), [
186
+ query_1.AttributeChecker.notEmptyAttribute("scope"),
187
+ query_1.AttributeChecker.notEquals("scope", ["col"])
188
+ ]),
189
+ description: "Table column header scope attribute",
190
+ help: "Set table column header scope attribute to col"
191
+ }),
192
+ model_1.AutoCheckA11yRule.from({
193
+ criterion: "5.7",
194
+ wcag: "1.3.1 A",
195
+ id: "5.7.2",
196
+ elementType: "table",
197
+ query: new query_1.CompliantAttributesQuery(new query_1.ByTagQuery([
198
+ ...selector_helper_1.table.thRowHeader.buildSelector([selector_helper_1.table.selector.withData], "table"),
199
+ ]), [
200
+ query_1.AttributeChecker.notEmptyAttribute("scope"),
201
+ query_1.AttributeChecker.notEquals("scope", ["row"])
202
+ ]),
203
+ description: "Table row header scope attribute",
204
+ help: "Set table column header scope attribute to row"
205
+ }),
206
+ model_1.AutoCheckA11yRule.from({
207
+ criterion: "5.7",
208
+ wcag: "1.3.1 A",
209
+ id: "5.7.3",
210
+ elementType: "table",
211
+ query: new query_1.OrQuery([
212
+ new query_1.CompliantAttributesQuery(new query_1.ByTagQuery([
213
+ "table:not([role=presentation]) tr:not(:first-child) th:not(:first-child)"
214
+ ]), [
215
+ query_1.AttributeChecker.notUniqueId()
216
+ ]),
217
+ new query_1.CompliantAttributesQuery(new query_1.ByTagQuery([
218
+ "table:not([role=presentation]) tr:not(:first-child) th:not(:first-child)"
219
+ ]), [
220
+ query_1.AttributeChecker.notEmptyAttribute("scope")
221
+ ]),
222
+ new query_1.CompliantAttributesQuery(new query_1.ByTagQuery([
223
+ "table:not([role=presentation]) tr:not(:first-child) th:not(:first-child)"
224
+ ]), [
225
+ query_1.AttributeChecker.equals("role", ["rowheader", "columnheader"])
226
+ ])
227
+ ]),
228
+ description: "each header does not apply to the entire row or column must be set properly"
229
+ }),
230
+ model_1.ManualCheckA11yRule.from({
231
+ criterion: "5.7",
232
+ wcag: "1.3.1 A",
233
+ id: "5.7.4",
234
+ elementType: "table",
235
+ query: new query_1.ByTagQuery([
236
+ selector_helper_1.table.selector.withData, "[role=table]"
237
+ ]),
238
+ description: "Each cell associated with several headers, the header attribute must be filled in correctly.",
239
+ help: "Each cell associated with several headers, the header attribute must contain the list of ids referring to the target headers."
240
+ }),
241
+ model_1.AutoCheckA11yRule.from({
242
+ criterion: "5.7",
243
+ wcag: "1.3.1 A",
244
+ id: "5.7.5",
245
+ elementType: "table",
246
+ query: new query_1.CompliantAttributesQuery(new query_1.ByTagQuery([
247
+ "table:not([role=presentation]) tr:first-child th",
248
+ "[role=table] tr:first-child th"
249
+ ]), [
250
+ query_1.AttributeChecker.notEmptyAttribute("role"),
251
+ query_1.AttributeChecker.notEquals("role", ["columnheader"])
252
+ ]),
253
+ description: "Table column header role attribute",
254
+ help: "Set table column header role attribute to 'columnheader'"
255
+ }),
256
+ model_1.AutoCheckA11yRule.from({
257
+ criterion: "5.7",
258
+ wcag: "1.3.1 A",
259
+ id: "5.7.5",
260
+ elementType: "table",
261
+ query: new query_1.CompliantAttributesQuery(new query_1.ByTagQuery([
262
+ "table:not([role=presentation]) tr:not(:first-child) th:first-child",
263
+ "[role=table] tr:not(:first-child) th:first-child"
264
+ ]), [
265
+ query_1.AttributeChecker.notEmptyAttribute("role"),
266
+ query_1.AttributeChecker.notEquals("role", ["rowheader"])
267
+ ]),
268
+ description: "Table row header role attribute",
269
+ help: "Set table row header role attribute to 'rowheader'"
270
+ }),
271
+ model_1.AutoCheckA11yRule.from({
272
+ criterion: "5.8",
273
+ wcag: "1.3.1 A",
274
+ id: "5.8.1",
275
+ elementType: "table",
276
+ query: new query_1.ByTagQuery([
277
+ selector_helper_1.table.selector.withFormatting + "[summary]",
278
+ selector_helper_1.table.selector.withFormatting + ":has(caption)",
279
+ selector_helper_1.table.selector.withFormatting + ":has(thead)",
280
+ selector_helper_1.table.selector.withFormatting + ":has(th)",
281
+ selector_helper_1.table.selector.withFormatting + ":has(tfoot)",
282
+ selector_helper_1.table.selector.withFormatting + " :has(> [role=rowheader])",
283
+ selector_helper_1.table.selector.withFormatting + " :has(> [role=columnheader])",
284
+ selector_helper_1.table.selector.withFormatting + " td[scope]",
285
+ selector_helper_1.table.selector.withFormatting + " td[headers]",
286
+ selector_helper_1.table.selector.withFormatting + " td[axis]",
287
+ ]),
288
+ description: "table with presentation role must have revelant content",
289
+ attributes: [
290
+ "child:td"
291
+ ],
292
+ help: "adapt these <td> children content to be relevant"
293
+ })
294
+ ];
@@ -1,2 +1,2 @@
1
- declare const _default: never[];
2
- export default _default;
1
+ declare const _default: never[];
2
+ export default _default;
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = [];
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [];
@@ -1,2 +1,2 @@
1
- declare const _default: never[];
2
- export default _default;
1
+ declare const _default: never[];
2
+ export default _default;
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = [];
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [];
@@ -1,14 +1,13 @@
1
- import { AutoCheckA11yRule } from "../../../model";
2
- declare const _default: (AutoCheckA11yRule & {
3
- attributes?: string[] | undefined;
4
- reference: string;
5
- criterion: string;
6
- wcag: string;
7
- id: string;
8
- elementType: string;
9
- query: import("../../../query").Query;
10
- description?: string | undefined;
11
- help?: string | string[] | undefined;
12
- shouldNotExist?: boolean | undefined;
13
- })[];
14
- export default _default;
1
+ import { AutoCheckA11yRule } from "../../../model";
2
+ declare const _default: (AutoCheckA11yRule & {
3
+ attributes?: string[] | undefined;
4
+ criterion: string;
5
+ wcag: string;
6
+ id: string;
7
+ elementType: string;
8
+ query: import("../../../query").Query;
9
+ description?: string | undefined;
10
+ help?: string | string[] | undefined;
11
+ shouldNotExist?: boolean | undefined;
12
+ })[];
13
+ export default _default;
@@ -1,78 +1,72 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const model_1 = require("../../../model");
4
- const query_1 = require("../../../query");
5
- exports.default = [
6
- model_1.AutoCheckA11yRule.from({
7
- reference: "RGAA",
8
- criterion: "8.1",
9
- wcag: "4.1.1 A",
10
- id: "8.1.1",
11
- elementType: "doctype",
12
- query: new query_1.DoctypeQuery(),
13
- description: "current page has no doctype or a doctype different to html",
14
- help: "add <!DOCTYPE html> in the current page"
15
- }),
16
- model_1.AutoCheckA11yRule.from({
17
- reference: "RGAA",
18
- criterion: "8.3",
19
- wcag: "3.1.1 A",
20
- id: "8.3.1",
21
- elementType: "lang",
22
- query: new query_1.ByTagQuery([
23
- "html:not([lang]):not([xml\\:lang])"
24
- ]),
25
- description: "current page has no language specified",
26
- help: "add lang attribute to html tag"
27
- }),
28
- model_1.ManualCheckA11yRule.from({
29
- reference: "RGAA",
30
- criterion: "8.4",
31
- wcag: "3.1.1 A",
32
- id: "8.4.1",
33
- elementType: "lang",
34
- query: new query_1.ByTagQuery([
35
- "html[lang]",
36
- "html[xml\\:lang]"
37
- ]),
38
- description: "if present, attributes lang, xml:lang must be relevant",
39
- help: "adapt these attributes to be relevant"
40
- }),
41
- model_1.AutoCheckA11yRule.from({
42
- reference: "RGAA",
43
- criterion: "8.5",
44
- wcag: "2.4.2 A",
45
- id: "8.5.1",
46
- elementType: "title",
47
- query: new query_1.ByTagQuery([
48
- "title"
49
- ]),
50
- description: "current page has no title tag",
51
- help: "add a title tag to the current page"
52
- }),
53
- model_1.ManualCheckA11yRule.from({
54
- reference: "RGAA",
55
- criterion: "8.6",
56
- wcag: "2.4.2 A",
57
- id: "8.6.1",
58
- elementType: "mandatory - title",
59
- query: new query_1.ByTagQuery([
60
- "title"
61
- ]),
62
- attributes: [],
63
- description: "if present, title tag must be relevant",
64
- help: "adapt this tag content"
65
- }),
66
- model_1.AutoCheckA11yRule.from({
67
- reference: "RGAA",
68
- criterion: "8.10",
69
- wcag: "1.3.2 A",
70
- id: "8.10.1",
71
- elementType: "mandatory - reading",
72
- query: new query_1.ByTagQuery([
73
- "[dir]:not([dir='rtl'], [dir='ltr'], [dir='auto'])"
74
- ]),
75
- description: "if present, dir attribute must be relevant",
76
- help: "adapt value of dir attribute"
77
- })
78
- ];
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const model_1 = require("../../../model");
4
+ const query_1 = require("../../../query");
5
+ exports.default = [
6
+ model_1.AutoCheckA11yRule.from({
7
+ criterion: "8.1",
8
+ wcag: "4.1.1 A",
9
+ id: "8.1.1",
10
+ elementType: "doctype",
11
+ query: new query_1.DoctypeQuery(),
12
+ description: "current page has no doctype or a doctype different to html",
13
+ help: "add <!DOCTYPE html> in the current page"
14
+ }),
15
+ model_1.AutoCheckA11yRule.from({
16
+ criterion: "8.3",
17
+ wcag: "3.1.1 A",
18
+ id: "8.3.1",
19
+ elementType: "lang",
20
+ query: new query_1.ByTagQuery([
21
+ "html:not([lang]):not([xml\\:lang])"
22
+ ]),
23
+ description: "current page has no language specified",
24
+ help: "add lang attribute to html tag"
25
+ }),
26
+ model_1.ManualCheckA11yRule.from({
27
+ criterion: "8.4",
28
+ wcag: "3.1.1 A",
29
+ id: "8.4.1",
30
+ elementType: "lang",
31
+ query: new query_1.ByTagQuery([
32
+ "html[lang]",
33
+ "html[xml\\:lang]"
34
+ ]),
35
+ description: "if present, attributes lang, xml:lang must be relevant",
36
+ help: "adapt these attributes to be relevant"
37
+ }),
38
+ model_1.AutoCheckA11yRule.from({
39
+ criterion: "8.5",
40
+ wcag: "2.4.2 A",
41
+ id: "8.5.1",
42
+ elementType: "title",
43
+ query: new query_1.ByTagQuery([
44
+ "title"
45
+ ]),
46
+ description: "current page has no title tag",
47
+ help: "add a title tag to the current page"
48
+ }),
49
+ model_1.ManualCheckA11yRule.from({
50
+ criterion: "8.6",
51
+ wcag: "2.4.2 A",
52
+ id: "8.6.1",
53
+ elementType: "mandatory - title",
54
+ query: new query_1.ByTagQuery([
55
+ "title"
56
+ ]),
57
+ attributes: [],
58
+ description: "if present, title tag must be relevant",
59
+ help: "adapt this tag content"
60
+ }),
61
+ model_1.AutoCheckA11yRule.from({
62
+ criterion: "8.10",
63
+ wcag: "1.3.2 A",
64
+ id: "8.10.1",
65
+ elementType: "mandatory - reading",
66
+ query: new query_1.ByTagQuery([
67
+ "[dir]:not([dir='rtl'], [dir='ltr'], [dir='auto'])"
68
+ ]),
69
+ description: "if present, dir attribute must be relevant",
70
+ help: "adapt value of dir attribute"
71
+ })
72
+ ];
@@ -1,2 +1,2 @@
1
- declare const _default: never[];
2
- export default _default;
1
+ declare const _default: never[];
2
+ export default _default;
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = [];
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [];
@@ -1,17 +1,56 @@
1
- declare class SelectorRule {
2
- readonly SELECTOR: string;
3
- readonly ATTRIBUTES: string[];
4
- constructor(SELECTOR: string, ATTRIBUTES: string[]);
5
- buildSelectorWithAttributes(): string[];
6
- buildSelectorWithoutAttributes(): string;
7
- }
8
- export declare const informativeContent: {
9
- image: SelectorRule;
10
- area: SelectorRule;
11
- input: SelectorRule;
12
- object: SelectorRule;
13
- embed: SelectorRule;
14
- svg: SelectorRule;
15
- canvas: SelectorRule;
16
- };
17
- export {};
1
+ declare class SelectorRule {
2
+ readonly SELECTOR: string;
3
+ readonly ATTRIBUTES: string[];
4
+ constructor(SELECTOR: string, ATTRIBUTES: string[]);
5
+ buildSelectorWithAttributes(): string[];
6
+ }
7
+ export declare const informativeContent: {
8
+ image: SelectorRule;
9
+ area: SelectorRule;
10
+ input: SelectorRule;
11
+ object: SelectorRule;
12
+ embed: SelectorRule;
13
+ svg: SelectorRule;
14
+ canvas: SelectorRule;
15
+ };
16
+ export declare const siblingElement: {
17
+ button: SelectorRule;
18
+ a: SelectorRule;
19
+ };
20
+ /** CSS SELECTOR HELPER *******/
21
+ declare class CssSelectorRule {
22
+ readonly attributes: string[];
23
+ readonly selector: string;
24
+ readonly role: string;
25
+ constructor(attributes: string[], selector?: string, role?: string);
26
+ buildSelector(overrideSelector?: string[], overrideRole?: string | undefined): string[];
27
+ }
28
+ export declare const commonCssSelector: {
29
+ ariaDescribedBy: string[];
30
+ title: string[];
31
+ ariaLabelledBy: string[];
32
+ ariaLabel: string[];
33
+ };
34
+ export declare const tableCssSelector: {
35
+ complexTh: string[];
36
+ complexRowHeader: string[];
37
+ complexColumnHeader: string[];
38
+ };
39
+ export declare const table: {
40
+ selector: {
41
+ withFormatting: string;
42
+ complex: string[];
43
+ withData: string;
44
+ };
45
+ noCaption: CssSelectorRule;
46
+ caption: CssSelectorRule;
47
+ summary: CssSelectorRule;
48
+ ariaDescribedBy: CssSelectorRule;
49
+ title: CssSelectorRule;
50
+ ariaLabel: CssSelectorRule;
51
+ ariaLabelledBy: CssSelectorRule;
52
+ thColumnHeader: CssSelectorRule;
53
+ thRowHeader: CssSelectorRule;
54
+ hasComplexHeader: CssSelectorRule;
55
+ };
56
+ export {};