@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.
- package/CHANGELOG.md +123 -0
- package/CONTRIBUTING.md +46 -0
- package/LICENSE +1 -1
- package/README.md +49 -69
- package/STRUCTURE.md +10 -0
- package/bundle/uuv-a11y.bundle.js +2 -2
- package/bundle/uuv-a11y.bundle.js.LICENSE.txt +1 -19
- package/dist/CHANGELOG.md +116 -0
- package/dist/CONTRIBUTING.md +46 -0
- package/dist/README.md +49 -69
- package/dist/STRUCTURE.md +10 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -17
- package/dist/lib/engine/engine.d.ts +12 -12
- package/dist/lib/engine/engine.js +135 -123
- package/dist/lib/index.d.ts +3 -3
- package/dist/lib/index.js +19 -19
- package/dist/lib/model/checker.d.ts +14 -14
- package/dist/lib/model/checker.js +35 -35
- package/dist/lib/model/index.d.ts +4 -4
- package/dist/lib/model/index.js +20 -20
- package/dist/lib/model/reference.d.ts +55 -55
- package/dist/lib/model/reference.js +66 -66
- package/dist/lib/model/result.d.ts +58 -57
- package/dist/lib/model/result.js +144 -144
- package/dist/lib/model/rule.d.ts +92 -99
- package/dist/lib/model/rule.js +51 -53
- package/dist/lib/query/00-query.d.ts +9 -4
- package/dist/lib/query/00-query.js +12 -2
- package/dist/lib/query/accessible-name.query.d.ts +8 -8
- package/dist/lib/query/accessible-name.query.js +31 -34
- package/dist/lib/query/by-role.query.d.ts +9 -8
- package/dist/lib/query/by-role.query.js +43 -27
- package/dist/lib/query/by-sibling.query.d.ts +12 -0
- package/dist/lib/query/by-sibling.query.js +100 -0
- package/dist/lib/query/by-tag.query.d.ts +7 -7
- package/dist/lib/query/by-tag.query.js +19 -20
- package/dist/lib/query/compliant-attributes/attribut-specification.d.ts +25 -0
- package/dist/lib/query/compliant-attributes/attribut-specification.js +71 -0
- package/dist/lib/query/compliant-attributes/attribute-checker.d.ts +35 -0
- package/dist/lib/query/compliant-attributes/attribute-checker.js +55 -0
- package/dist/lib/query/compliant-attributes/compliant-attributes.query.d.ts +9 -0
- package/dist/lib/query/compliant-attributes/compliant-attributes.query.js +24 -0
- package/dist/lib/query/doctype.query.d.ts +5 -5
- package/dist/lib/query/doctype.query.js +16 -15
- package/dist/lib/query/form.query.d.ts +8 -8
- package/dist/lib/query/form.query.js +87 -87
- package/dist/lib/query/index.d.ts +13 -6
- package/dist/lib/query/index.js +29 -22
- package/dist/lib/query/operators/and-query.d.ts +8 -0
- package/dist/lib/query/operators/and-query.js +25 -0
- package/dist/lib/query/operators/operator-query.d.ts +8 -0
- package/dist/lib/query/operators/operator-query.js +14 -0
- package/dist/lib/query/operators/or-query.d.ts +8 -0
- package/dist/lib/query/operators/or-query.js +24 -0
- package/dist/lib/reference/alix/alix-checker.js +82 -82
- package/dist/lib/reference/alix/alix-rules.js +1028 -1028
- package/dist/lib/reference/alix/index.js +3 -3
- package/dist/lib/reference/index.d.ts +1 -1
- package/dist/lib/reference/index.js +18 -18
- package/dist/lib/reference/rgaa/common.d.ts +2 -2
- package/dist/lib/reference/rgaa/common.js +5 -5
- package/dist/lib/reference/rgaa/coverage/coverage-helper.d.ts +2 -2
- package/dist/lib/reference/rgaa/coverage/coverage-helper.js +100 -100
- package/dist/lib/reference/rgaa/coverage/coverage-statement.json +110 -90
- package/dist/lib/reference/rgaa/index.d.ts +2 -2
- package/dist/lib/reference/rgaa/index.js +18 -18
- package/dist/lib/reference/rgaa/rgaa-checker.d.ts +8 -8
- package/dist/lib/reference/rgaa/rgaa-checker.js +31 -31
- package/dist/lib/reference/rgaa/rgaa-reference.d.ts +2 -2
- package/dist/lib/reference/rgaa/rgaa-reference.js +44 -44
- package/dist/lib/reference/rgaa/rgaa_4.1.criteres.json +4144 -4144
- package/dist/lib/reference/rgaa/rules/1-image.d.ts +13 -14
- package/dist/lib/reference/rgaa/rules/1-image.js +618 -644
- package/dist/lib/reference/rgaa/rules/10-display.d.ts +2 -2
- package/dist/lib/reference/rgaa/rules/10-display.js +3 -3
- package/dist/lib/reference/rgaa/rules/11-form.d.ts +13 -14
- package/dist/lib/reference/rgaa/rules/11-form.js +15 -16
- package/dist/lib/reference/rgaa/rules/12-navigation.d.ts +2 -2
- package/dist/lib/reference/rgaa/rules/12-navigation.js +3 -3
- package/dist/lib/reference/rgaa/rules/13-visit.d.ts +2 -2
- package/dist/lib/reference/rgaa/rules/13-visit.js +3 -3
- package/dist/lib/reference/rgaa/rules/2-frame.d.ts +13 -14
- package/dist/lib/reference/rgaa/rules/2-frame.js +35 -34
- package/dist/lib/reference/rgaa/rules/3-color.d.ts +13 -14
- package/dist/lib/reference/rgaa/rules/3-color.js +47 -50
- package/dist/lib/reference/rgaa/rules/4-multimedia.d.ts +2 -2
- package/dist/lib/reference/rgaa/rules/4-multimedia.js +3 -3
- package/dist/lib/reference/rgaa/rules/5-table.d.ts +13 -2
- package/dist/lib/reference/rgaa/rules/5-table.js +294 -3
- package/dist/lib/reference/rgaa/rules/6-link.d.ts +2 -2
- package/dist/lib/reference/rgaa/rules/6-link.js +3 -3
- package/dist/lib/reference/rgaa/rules/7-script.d.ts +2 -2
- package/dist/lib/reference/rgaa/rules/7-script.js +3 -3
- package/dist/lib/reference/rgaa/rules/8-required-element.d.ts +13 -14
- package/dist/lib/reference/rgaa/rules/8-required-element.js +72 -78
- package/dist/lib/reference/rgaa/rules/9-structure.d.ts +2 -2
- package/dist/lib/reference/rgaa/rules/9-structure.js +3 -3
- package/dist/lib/reference/rgaa/selector-helper.d.ts +56 -17
- package/dist/lib/reference/rgaa/selector-helper.js +105 -33
- package/dist/package.json +15 -3
- package/docs/diagram-a11y-rgaa.excalidraw +1654 -0
- package/docs/diagram-a11y-rgaa.png +0 -0
- package/package.json +15 -3
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.OrQuery = void 0;
|
|
7
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
8
|
+
const DOM_NODE_ATTRIBUTE = "domNode";
|
|
9
|
+
class OrQuery {
|
|
10
|
+
queries;
|
|
11
|
+
constructor(queries) {
|
|
12
|
+
this.queries = queries;
|
|
13
|
+
}
|
|
14
|
+
execute() {
|
|
15
|
+
const queryResults = this.queries.map(query => query.execute());
|
|
16
|
+
return queryResults.reduce((left, right) => {
|
|
17
|
+
return lodash_1.default.unionBy(left, right, DOM_NODE_ATTRIBUTE);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
getSelector() {
|
|
21
|
+
return `${this.queries.map(query => query.getSelector()).join(",")}`;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.OrQuery = OrQuery;
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import {
|
|
3
|
-
// AutoCheckRule,
|
|
4
|
-
// CheckRelevantSummary,
|
|
5
|
-
// ErrorSummary, LogTypeEnum,
|
|
6
|
-
// ManualCheckRule, Reference,
|
|
7
|
-
// RuleTypeEnum,
|
|
8
|
-
// ThirdPartyReferenceEnum,
|
|
9
|
-
// ThirdPartyTypeEnum
|
|
10
|
-
// } from "../../model";
|
|
11
|
-
// import { searchByRoleWithoutAttribute, searchByTag } from "../core";
|
|
12
|
-
// import { alix } from "@uuv/runner-commons";
|
|
13
|
-
// import { Observable } from "rxjs";
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
// abstract class AlixChecker implements Reference {
|
|
17
|
-
// constructor(public version: string) {}
|
|
18
|
-
//
|
|
19
|
-
// getErrorLogCommand(type: LogTypeEnum): string {
|
|
20
|
-
// throw new Error("Method not implemented.");
|
|
21
|
-
// }
|
|
22
|
-
// getCheckLogCommand(type: LogTypeEnum): string {
|
|
23
|
-
// throw new Error("Method not implemented.");
|
|
24
|
-
// }
|
|
25
|
-
//
|
|
26
|
-
// type = ThirdPartyTypeEnum.UNKNOWN;
|
|
27
|
-
// errorSummary = new ErrorSummary(ThirdPartyReferenceEnum.ALIX);
|
|
28
|
-
// checkRelevantSummary = new CheckRelevantSummary(ThirdPartyReferenceEnum.ALIX);
|
|
29
|
-
// emitter: Observable<boolean> = new Observable();
|
|
30
|
-
//
|
|
31
|
-
// checkCriteria(): void {
|
|
32
|
-
// cy.url({ log: false }).then(url => {
|
|
33
|
-
// this.errorSummary.url = url;
|
|
34
|
-
// this.checkRelevantSummary.url = url;
|
|
35
|
-
// alix.rules.sort((a: any, b: any) => {
|
|
36
|
-
// if (a.check > b.check) {
|
|
37
|
-
// return 1;
|
|
38
|
-
// }
|
|
39
|
-
// if (a.check < b.check) {
|
|
40
|
-
// return -1;
|
|
41
|
-
// }
|
|
42
|
-
// return 0;
|
|
43
|
-
// }).filter((elem) => {
|
|
44
|
-
// return elem.elementType.includes(this.type.toString());
|
|
45
|
-
// })
|
|
46
|
-
// .forEach((rule: any, index: number, array: any[]) => {
|
|
47
|
-
// const isLast = index + 1 === array.length;
|
|
48
|
-
// if (rule.type === RuleTypeEnum.ROLE) {
|
|
49
|
-
// searchByRoleWithoutAttribute(Object.assign(new ManualCheckRule, rule), this, isLast);
|
|
50
|
-
// }
|
|
51
|
-
// if (rule.type === RuleTypeEnum.TAG) {
|
|
52
|
-
// searchByTag(rule as AutoCheckRule, this, isLast);
|
|
53
|
-
// }
|
|
54
|
-
// });
|
|
55
|
-
// });
|
|
56
|
-
// }
|
|
57
|
-
// }
|
|
58
|
-
//
|
|
59
|
-
// export class AlixError extends AlixChecker implements Reference {
|
|
60
|
-
// override type: ThirdPartyTypeEnum = ThirdPartyTypeEnum.ERROR;
|
|
61
|
-
// override getErrorLogCommand(type: LogTypeEnum): string {
|
|
62
|
-
// return `[${type.toString()}] error!`;
|
|
63
|
-
// }
|
|
64
|
-
// }
|
|
65
|
-
// export class AlixWarning extends AlixChecker implements Reference {
|
|
66
|
-
// override type: ThirdPartyTypeEnum = ThirdPartyTypeEnum.WARNING;
|
|
67
|
-
// override getErrorLogCommand(type: LogTypeEnum): string {
|
|
68
|
-
// return `[${type.toString()}] warning!`;
|
|
69
|
-
// }
|
|
70
|
-
// }
|
|
71
|
-
// export class AlixAdvice extends AlixChecker implements Reference {
|
|
72
|
-
// override type: ThirdPartyTypeEnum = ThirdPartyTypeEnum.ADVICE;
|
|
73
|
-
// override getErrorLogCommand(type: LogTypeEnum): string {
|
|
74
|
-
// return `[${type.toString()}] advice!`;
|
|
75
|
-
// }
|
|
76
|
-
// }
|
|
77
|
-
// export class AlixObsolete extends AlixChecker implements Reference {
|
|
78
|
-
// override type: ThirdPartyTypeEnum = ThirdPartyTypeEnum.OBSOLETE;
|
|
79
|
-
// override getErrorLogCommand(type: LogTypeEnum): string {
|
|
80
|
-
// return `[${type.toString()}] obsolete!`;
|
|
81
|
-
// }
|
|
82
|
-
// }
|
|
1
|
+
"use strict";
|
|
2
|
+
// import {
|
|
3
|
+
// AutoCheckRule,
|
|
4
|
+
// CheckRelevantSummary,
|
|
5
|
+
// ErrorSummary, LogTypeEnum,
|
|
6
|
+
// ManualCheckRule, Reference,
|
|
7
|
+
// RuleTypeEnum,
|
|
8
|
+
// ThirdPartyReferenceEnum,
|
|
9
|
+
// ThirdPartyTypeEnum
|
|
10
|
+
// } from "../../model";
|
|
11
|
+
// import { searchByRoleWithoutAttribute, searchByTag } from "../core";
|
|
12
|
+
// import { alix } from "@uuv/runner-commons";
|
|
13
|
+
// import { Observable } from "rxjs";
|
|
14
|
+
//
|
|
15
|
+
//
|
|
16
|
+
// abstract class AlixChecker implements Reference {
|
|
17
|
+
// constructor(public version: string) {}
|
|
18
|
+
//
|
|
19
|
+
// getErrorLogCommand(type: LogTypeEnum): string {
|
|
20
|
+
// throw new Error("Method not implemented.");
|
|
21
|
+
// }
|
|
22
|
+
// getCheckLogCommand(type: LogTypeEnum): string {
|
|
23
|
+
// throw new Error("Method not implemented.");
|
|
24
|
+
// }
|
|
25
|
+
//
|
|
26
|
+
// type = ThirdPartyTypeEnum.UNKNOWN;
|
|
27
|
+
// errorSummary = new ErrorSummary(ThirdPartyReferenceEnum.ALIX);
|
|
28
|
+
// checkRelevantSummary = new CheckRelevantSummary(ThirdPartyReferenceEnum.ALIX);
|
|
29
|
+
// emitter: Observable<boolean> = new Observable();
|
|
30
|
+
//
|
|
31
|
+
// checkCriteria(): void {
|
|
32
|
+
// cy.url({ log: false }).then(url => {
|
|
33
|
+
// this.errorSummary.url = url;
|
|
34
|
+
// this.checkRelevantSummary.url = url;
|
|
35
|
+
// alix.rules.sort((a: any, b: any) => {
|
|
36
|
+
// if (a.check > b.check) {
|
|
37
|
+
// return 1;
|
|
38
|
+
// }
|
|
39
|
+
// if (a.check < b.check) {
|
|
40
|
+
// return -1;
|
|
41
|
+
// }
|
|
42
|
+
// return 0;
|
|
43
|
+
// }).filter((elem) => {
|
|
44
|
+
// return elem.elementType.includes(this.type.toString());
|
|
45
|
+
// })
|
|
46
|
+
// .forEach((rule: any, index: number, array: any[]) => {
|
|
47
|
+
// const isLast = index + 1 === array.length;
|
|
48
|
+
// if (rule.type === RuleTypeEnum.ROLE) {
|
|
49
|
+
// searchByRoleWithoutAttribute(Object.assign(new ManualCheckRule, rule), this, isLast);
|
|
50
|
+
// }
|
|
51
|
+
// if (rule.type === RuleTypeEnum.TAG) {
|
|
52
|
+
// searchByTag(rule as AutoCheckRule, this, isLast);
|
|
53
|
+
// }
|
|
54
|
+
// });
|
|
55
|
+
// });
|
|
56
|
+
// }
|
|
57
|
+
// }
|
|
58
|
+
//
|
|
59
|
+
// export class AlixError extends AlixChecker implements Reference {
|
|
60
|
+
// override type: ThirdPartyTypeEnum = ThirdPartyTypeEnum.ERROR;
|
|
61
|
+
// override getErrorLogCommand(type: LogTypeEnum): string {
|
|
62
|
+
// return `[${type.toString()}] error!`;
|
|
63
|
+
// }
|
|
64
|
+
// }
|
|
65
|
+
// export class AlixWarning extends AlixChecker implements Reference {
|
|
66
|
+
// override type: ThirdPartyTypeEnum = ThirdPartyTypeEnum.WARNING;
|
|
67
|
+
// override getErrorLogCommand(type: LogTypeEnum): string {
|
|
68
|
+
// return `[${type.toString()}] warning!`;
|
|
69
|
+
// }
|
|
70
|
+
// }
|
|
71
|
+
// export class AlixAdvice extends AlixChecker implements Reference {
|
|
72
|
+
// override type: ThirdPartyTypeEnum = ThirdPartyTypeEnum.ADVICE;
|
|
73
|
+
// override getErrorLogCommand(type: LogTypeEnum): string {
|
|
74
|
+
// return `[${type.toString()}] advice!`;
|
|
75
|
+
// }
|
|
76
|
+
// }
|
|
77
|
+
// export class AlixObsolete extends AlixChecker implements Reference {
|
|
78
|
+
// override type: ThirdPartyTypeEnum = ThirdPartyTypeEnum.OBSOLETE;
|
|
79
|
+
// override getErrorLogCommand(type: LogTypeEnum): string {
|
|
80
|
+
// return `[${type.toString()}] obsolete!`;
|
|
81
|
+
// }
|
|
82
|
+
// }
|