@uuv/a11y 1.0.0-beta.7 → 1.0.0-beta.70
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 +684 -0
- package/LICENSE +0 -2
- package/README.md +7 -7
- package/bundle/uuv-a11y.bundle.js +2 -2
- package/bundle/uuv-a11y.bundle.js.LICENSE.txt +12 -0
- package/dist/CHANGELOG.md +683 -0
- package/dist/README.md +7 -7
- package/dist/lib/engine/engine.js +17 -7
- package/dist/lib/model/checker.d.ts +3 -12
- package/dist/lib/model/checker.js +0 -33
- package/dist/lib/model/checklist-checker.d.ts +15 -0
- package/dist/lib/model/checklist-checker.js +61 -0
- package/dist/lib/model/index.d.ts +2 -1
- package/dist/lib/model/index.js +2 -1
- package/dist/lib/model/reference.js +1 -1
- package/dist/lib/model/result.js +1 -1
- package/dist/lib/model/rule.d.ts +8 -8
- package/dist/lib/model/rule.js +3 -3
- package/dist/lib/model/uuv-a11y-result.d.ts +54 -0
- package/dist/lib/model/uuv-a11y-result.js +17 -0
- package/dist/lib/query/accessible-name.query.d.ts +2 -0
- package/dist/lib/query/accessible-name.query.js +8 -2
- package/dist/lib/query/compliant-attributes/attribut-specification.d.ts +24 -2
- package/dist/lib/query/compliant-attributes/attribut-specification.js +64 -2
- package/dist/lib/query/compliant-attributes/attribute-checker.d.ts +24 -0
- package/dist/lib/query/compliant-attributes/attribute-checker.js +36 -0
- package/dist/lib/reference/index.d.ts +1 -0
- package/dist/lib/reference/index.js +1 -0
- package/dist/lib/reference/rgaa/coverage/coverage-helper.js +18 -9
- package/dist/lib/reference/rgaa/coverage/coverage-statement.json +39 -2
- package/dist/lib/reference/rgaa/rgaa-checker.d.ts +3 -3
- package/dist/lib/reference/rgaa/rgaa-checker.js +2 -2
- package/dist/lib/reference/rgaa/rules/1-image.d.ts +4 -4
- package/dist/lib/reference/rgaa/rules/1-image.js +2 -2
- package/dist/lib/reference/rgaa/rules/11-form.d.ts +4 -4
- package/dist/lib/reference/rgaa/rules/2-frame.d.ts +4 -4
- package/dist/lib/reference/rgaa/rules/3-color.d.ts +4 -4
- package/dist/lib/reference/rgaa/rules/5-table.d.ts +12 -1
- package/dist/lib/reference/rgaa/rules/5-table.js +292 -1
- package/dist/lib/reference/rgaa/rules/6-link.d.ts +12 -1
- package/dist/lib/reference/rgaa/rules/6-link.js +147 -1
- package/dist/lib/reference/rgaa/rules/8-required-element.d.ts +4 -4
- package/dist/lib/reference/rgaa/rules/8-required-element.js +57 -3
- package/dist/lib/reference/rgaa/selector-helper.d.ts +36 -0
- package/dist/lib/reference/rgaa/selector-helper.js +73 -1
- package/dist/lib/reference/wcag/index.d.ts +1 -0
- package/dist/lib/reference/wcag/index.js +17 -0
- package/dist/lib/reference/wcag/wcag-checker.d.ts +14 -0
- package/dist/lib/reference/wcag/wcag-checker.js +86 -0
- package/dist/lib/reference/wcag/wcag-helper.d.ts +9 -0
- package/dist/lib/reference/wcag/wcag-helper.js +73 -0
- package/dist/package.json +17 -13
- package/package.json +15 -11
|
@@ -15,15 +15,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.buildCoverage =
|
|
36
|
+
exports.buildCoverage = buildCoverage;
|
|
27
37
|
const model_1 = require("../../../model");
|
|
28
38
|
const PARTIAL_COVERAGE = __importStar(require("./coverage-statement.json"));
|
|
29
39
|
const common_1 = require("../common");
|
|
@@ -97,4 +107,3 @@ function buildCoverage() {
|
|
|
97
107
|
});
|
|
98
108
|
return referenceCoverage;
|
|
99
109
|
}
|
|
100
|
-
exports.buildCoverage = buildCoverage;
|
|
@@ -6,7 +6,39 @@
|
|
|
6
6
|
"1.1.5",
|
|
7
7
|
"1.1.6",
|
|
8
8
|
"2.1.1",
|
|
9
|
-
"2.2.1"
|
|
9
|
+
"2.2.1",
|
|
10
|
+
"5.1.1",
|
|
11
|
+
"5.2.1",
|
|
12
|
+
"5.3.1",
|
|
13
|
+
"5.4.1",
|
|
14
|
+
"5.5.1",
|
|
15
|
+
"5.6.1",
|
|
16
|
+
"5.6.2",
|
|
17
|
+
"5.6.3",
|
|
18
|
+
"5.6.4",
|
|
19
|
+
"5.7.1",
|
|
20
|
+
"5.7.2",
|
|
21
|
+
"5.7.3",
|
|
22
|
+
"5.7.4",
|
|
23
|
+
"5.7.5",
|
|
24
|
+
"5.8.1",
|
|
25
|
+
"6.1.1",
|
|
26
|
+
"6.1.2",
|
|
27
|
+
"6.1.3",
|
|
28
|
+
"6.1.4",
|
|
29
|
+
"6.1.5",
|
|
30
|
+
"6.2.1",
|
|
31
|
+
"8.1.1",
|
|
32
|
+
"8.1.2",
|
|
33
|
+
"8.1.3",
|
|
34
|
+
"8.3.1",
|
|
35
|
+
"8.4.1",
|
|
36
|
+
"8.5.1",
|
|
37
|
+
"8.6.1",
|
|
38
|
+
"8.7.1",
|
|
39
|
+
"8.8.1",
|
|
40
|
+
"8.10.1",
|
|
41
|
+
"8.10.2"
|
|
10
42
|
],
|
|
11
43
|
"inProgress": [
|
|
12
44
|
"1.1.4",
|
|
@@ -42,7 +74,9 @@
|
|
|
42
74
|
"1.6.4",
|
|
43
75
|
"1.6.5",
|
|
44
76
|
"1.6.6",
|
|
45
|
-
"1.6.7"
|
|
77
|
+
"1.6.7",
|
|
78
|
+
"8.2.1",
|
|
79
|
+
"8.9.1"
|
|
46
80
|
],
|
|
47
81
|
"wontBeImplemented": [
|
|
48
82
|
"1.1.6"
|
|
@@ -87,6 +121,9 @@
|
|
|
87
121
|
},
|
|
88
122
|
"1.2.6": {
|
|
89
123
|
"warning": "Pour les contrôles concernant les alternatives textuelles, nous utilisons la librairie [dom-accessibility-api](https://www.npmjs.com/package/dom-accessibility-api) qui implémente les [règles du W3C](https://w3c.github.io/accname/)"
|
|
124
|
+
},
|
|
125
|
+
"5": {
|
|
126
|
+
"warning": "Nous considérons qu'un *tableau de mise en forme* est une balise *table* possédant le rôle *presentation* \\\n Nous considérons qu'un *tableau avec header* est une balise *table* ou un rôle *table* possédant une balise *th* ou un élément avec un rôle *rowheader* ou un élément avec un rôle *columnheader*"
|
|
90
127
|
}
|
|
91
128
|
}
|
|
92
129
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
|
-
import {
|
|
3
|
-
export declare class RgaaChecker extends
|
|
2
|
+
import { A11yChecklistChecker } from "../../model/checklist-checker";
|
|
3
|
+
export declare class RgaaChecker extends A11yChecklistChecker {
|
|
4
4
|
emitter: Observable<boolean>;
|
|
5
5
|
constructor(url: string, enabledRules?: string[]);
|
|
6
6
|
private focusOnEnabledRules;
|
|
7
|
-
rules(): import("
|
|
7
|
+
rules(): import("../..").A11yRule[];
|
|
8
8
|
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RgaaChecker = void 0;
|
|
4
4
|
const rxjs_1 = require("rxjs");
|
|
5
|
-
const model_1 = require("../../model");
|
|
6
5
|
const engine_1 = require("../../engine/engine");
|
|
7
6
|
const rgaa_reference_1 = require("./rgaa-reference");
|
|
8
|
-
|
|
7
|
+
const checklist_checker_1 = require("../../model/checklist-checker");
|
|
8
|
+
class RgaaChecker extends checklist_checker_1.A11yChecklistChecker {
|
|
9
9
|
emitter = new rxjs_1.Observable();
|
|
10
10
|
constructor(url, enabledRules) {
|
|
11
11
|
super(url, new engine_1.Engine(url, rgaa_reference_1.A11Y_RGAA_REFERENCE), rgaa_reference_1.A11Y_RGAA_REFERENCE);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AutoCheckA11yRule } from "../../../model";
|
|
2
2
|
declare const _default: (AutoCheckA11yRule & {
|
|
3
|
-
attributes?: string[]
|
|
3
|
+
attributes?: string[];
|
|
4
4
|
criterion: string;
|
|
5
5
|
wcag: string;
|
|
6
6
|
id: string;
|
|
7
7
|
elementType: string;
|
|
8
8
|
query: import("../../../query").Query;
|
|
9
|
-
description?: string
|
|
10
|
-
help?: string | string[]
|
|
11
|
-
shouldNotExist?: boolean
|
|
9
|
+
description?: string;
|
|
10
|
+
help?: string | string[];
|
|
11
|
+
shouldNotExist?: boolean;
|
|
12
12
|
})[];
|
|
13
13
|
export default _default;
|
|
@@ -99,7 +99,7 @@ exports.default = [
|
|
|
99
99
|
wcag: "1.1.1 A",
|
|
100
100
|
id: "1.1.6",
|
|
101
101
|
elementType: "object",
|
|
102
|
-
query: query_1.OperatorQuery.And(new query_1.AccessibleNameQuery(new query_1.ByTagQuery([`${selector_helper_1.informativeContent.object.SELECTOR}[role=img]`]), true), new by_sibling_query_1.BySiblingQuery(new query_1.ByTagQuery([`${selector_helper_1.informativeContent.object.SELECTOR}[role=img]`]), false, [
|
|
102
|
+
query: query_1.OperatorQuery.And(new query_1.AccessibleNameQuery(new query_1.ByTagQuery([`${selector_helper_1.informativeContent.object.SELECTOR}[role=img]`]), true), new by_sibling_query_1.BySiblingQuery(new query_1.ByTagQuery([`${selector_helper_1.informativeContent.object.SELECTOR}[role=img]`]), false, [selector_helper_1.siblingElement.button.SELECTOR, "a"])),
|
|
103
103
|
description: "object has no alternative text",
|
|
104
104
|
help: "domNode corresponds to the object node and linkedNodes corresponds to the nodes to be analysed"
|
|
105
105
|
}),
|
|
@@ -108,7 +108,7 @@ exports.default = [
|
|
|
108
108
|
wcag: "1.1.1 A",
|
|
109
109
|
id: "1.1.6",
|
|
110
110
|
elementType: "object",
|
|
111
|
-
query: query_1.OperatorQuery.And(new query_1.AccessibleNameQuery(new query_1.ByTagQuery([`${selector_helper_1.informativeContent.object.SELECTOR}[role=img]`]), true), new by_sibling_query_1.BySiblingQuery(new query_1.ByTagQuery([`${selector_helper_1.informativeContent.object.SELECTOR}[role=img]`]), true, [
|
|
111
|
+
query: query_1.OperatorQuery.And(new query_1.AccessibleNameQuery(new query_1.ByTagQuery([`${selector_helper_1.informativeContent.object.SELECTOR}[role=img]`]), true), new by_sibling_query_1.BySiblingQuery(new query_1.ByTagQuery([`${selector_helper_1.informativeContent.object.SELECTOR}[role=img]`]), true, [selector_helper_1.siblingElement.button.SELECTOR, "a"])),
|
|
112
112
|
description: "object has sibling elements to check",
|
|
113
113
|
help: "domNode corresponds to the object node and linkedNodes corresponds to the nodes to be analysed"
|
|
114
114
|
}),
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AutoCheckA11yRule } from "../../../model";
|
|
2
2
|
declare const _default: (AutoCheckA11yRule & {
|
|
3
|
-
attributes?: string[]
|
|
3
|
+
attributes?: string[];
|
|
4
4
|
criterion: string;
|
|
5
5
|
wcag: string;
|
|
6
6
|
id: string;
|
|
7
7
|
elementType: string;
|
|
8
8
|
query: import("../../../query").Query;
|
|
9
|
-
description?: string
|
|
10
|
-
help?: string | string[]
|
|
11
|
-
shouldNotExist?: boolean
|
|
9
|
+
description?: string;
|
|
10
|
+
help?: string | string[];
|
|
11
|
+
shouldNotExist?: boolean;
|
|
12
12
|
})[];
|
|
13
13
|
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AutoCheckA11yRule } from "../../../model";
|
|
2
2
|
declare const _default: (AutoCheckA11yRule & {
|
|
3
|
-
attributes?: string[]
|
|
3
|
+
attributes?: string[];
|
|
4
4
|
criterion: string;
|
|
5
5
|
wcag: string;
|
|
6
6
|
id: string;
|
|
7
7
|
elementType: string;
|
|
8
8
|
query: import("../../../query").Query;
|
|
9
|
-
description?: string
|
|
10
|
-
help?: string | string[]
|
|
11
|
-
shouldNotExist?: boolean
|
|
9
|
+
description?: string;
|
|
10
|
+
help?: string | string[];
|
|
11
|
+
shouldNotExist?: boolean;
|
|
12
12
|
})[];
|
|
13
13
|
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ManualCheckA11yRule } from "../../../model";
|
|
2
2
|
declare const _default: (ManualCheckA11yRule & {
|
|
3
|
-
attributes?: string[]
|
|
3
|
+
attributes?: string[];
|
|
4
4
|
criterion: string;
|
|
5
5
|
wcag: string;
|
|
6
6
|
id: string;
|
|
7
7
|
elementType: string;
|
|
8
8
|
query: import("../../../query").Query;
|
|
9
|
-
description?: string
|
|
10
|
-
help?: string
|
|
11
|
-
shouldNotExist?: boolean
|
|
9
|
+
description?: string;
|
|
10
|
+
help?: string;
|
|
11
|
+
shouldNotExist?: boolean;
|
|
12
12
|
})[];
|
|
13
13
|
export default _default;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { AutoCheckA11yRule } from "../../../model";
|
|
2
|
+
declare const _default: (AutoCheckA11yRule & {
|
|
3
|
+
attributes?: string[];
|
|
4
|
+
criterion: string;
|
|
5
|
+
wcag: string;
|
|
6
|
+
id: string;
|
|
7
|
+
elementType: string;
|
|
8
|
+
query: import("../../../query").Query;
|
|
9
|
+
description?: string;
|
|
10
|
+
help?: string | string[];
|
|
11
|
+
shouldNotExist?: boolean;
|
|
12
|
+
})[];
|
|
2
13
|
export default _default;
|
|
@@ -1,3 +1,294 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
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,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { AutoCheckA11yRule } from "../../../model";
|
|
2
|
+
declare const _default: (AutoCheckA11yRule & {
|
|
3
|
+
attributes?: string[];
|
|
4
|
+
criterion: string;
|
|
5
|
+
wcag: string;
|
|
6
|
+
id: string;
|
|
7
|
+
elementType: string;
|
|
8
|
+
query: import("../../../query").Query;
|
|
9
|
+
description?: string;
|
|
10
|
+
help?: string | string[];
|
|
11
|
+
shouldNotExist?: boolean;
|
|
12
|
+
})[];
|
|
2
13
|
export default _default;
|