@markuplint/ml-spec 3.14.0 → 4.0.0-alpha.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/LICENSE +1 -1
- package/lib/constant/aria-version.d.ts +2 -2
- package/lib/constant/aria-version.js +2 -5
- package/lib/dom-traverse/accname-computation.js +4 -7
- package/lib/dom-traverse/get-attr-specs.d.ts +2 -2
- package/lib/dom-traverse/get-attr-specs.js +3 -7
- package/lib/dom-traverse/get-computed-aria-props.d.ts +6 -6
- package/lib/dom-traverse/get-computed-aria-props.js +13 -18
- package/lib/dom-traverse/get-computed-role.d.ts +2 -7
- package/lib/dom-traverse/get-computed-role.js +33 -39
- package/lib/dom-traverse/get-content-model.d.ts +2 -27
- package/lib/dom-traverse/get-content-model.js +5 -10
- package/lib/dom-traverse/get-explicit-role.d.ts +1 -1
- package/lib/dom-traverse/get-explicit-role.js +9 -14
- package/lib/dom-traverse/get-implicit-role.d.ts +2 -6
- package/lib/dom-traverse/get-implicit-role.js +8 -13
- package/lib/dom-traverse/get-non-presentational-ancestor.d.ts +5 -11
- package/lib/dom-traverse/get-non-presentational-ancestor.js +5 -10
- package/lib/dom-traverse/get-permitted-roles.d.ts +4 -8
- package/lib/dom-traverse/get-permitted-roles.js +3 -7
- package/lib/dom-traverse/get-spec.d.ts +2 -5
- package/lib/dom-traverse/get-spec.js +3 -7
- package/lib/dom-traverse/has-required-owned-elements.d.ts +2 -8
- package/lib/dom-traverse/has-required-owned-elements.js +13 -20
- package/lib/dom-traverse/is-exposed.d.ts +1 -1
- package/lib/dom-traverse/is-exposed.js +17 -24
- package/lib/dom-traverse/matches-context-role.d.ts +2 -7
- package/lib/dom-traverse/matches-context-role.js +5 -9
- package/lib/dom-traverse/may-be-focusable.d.ts +1 -1
- package/lib/dom-traverse/may-be-focusable.js +3 -7
- package/lib/index.d.ts +28 -28
- package/lib/index.js +28 -33
- package/lib/specs/aria-specs.d.ts +5 -8
- package/lib/specs/aria-specs.js +1 -5
- package/lib/specs/content-model-category-to-tag-names.d.ts +3 -6
- package/lib/specs/content-model-category-to-tag-names.js +1 -5
- package/lib/specs/get-aria.d.ts +3 -9
- package/lib/specs/get-aria.js +11 -17
- package/lib/specs/get-attr-specs.d.ts +4 -8
- package/lib/specs/get-attr-specs.js +6 -11
- package/lib/specs/get-implicit-role.d.ts +2 -8
- package/lib/specs/get-implicit-role.js +3 -7
- package/lib/specs/get-permitted-roles.d.ts +4 -10
- package/lib/specs/get-permitted-roles.js +14 -17
- package/lib/specs/get-role-spec.d.ts +4 -11
- package/lib/specs/get-role-spec.js +10 -14
- package/lib/specs/get-selectors-by-content-model-category.d.ts +2 -2
- package/lib/specs/get-selectors-by-content-model-category.js +2 -6
- package/lib/specs/get-spec-by-tag-name.d.ts +2 -6
- package/lib/specs/get-spec-by-tag-name.js +4 -9
- package/lib/specs/is-nothing-content-model.js +3 -7
- package/lib/specs/is-palpable-elements.d.ts +5 -9
- package/lib/specs/is-palpable-elements.js +5 -10
- package/lib/specs/is-presentational.js +1 -5
- package/lib/specs/is-void-element.d.ts +3 -1
- package/lib/specs/is-void-element.js +4 -10
- package/lib/specs/resolve-version.d.ts +3 -6
- package/lib/specs/resolve-version.js +7 -12
- package/lib/specs/schema-to-spec.d.ts +4 -4
- package/lib/specs/schema-to-spec.js +20 -25
- package/lib/types/aria.d.ts +133 -147
- package/lib/types/aria.js +1 -2
- package/lib/types/attributes.d.ts +110 -1504
- package/lib/types/attributes.js +1 -2
- package/lib/types/index.d.ts +149 -177
- package/lib/types/index.js +1 -2
- package/lib/types/permitted-structures.d.ts +35 -74
- package/lib/types/permitted-structures.js +1 -2
- package/lib/utils/get-ns.js +1 -5
- package/lib/utils/merge-array.d.ts +4 -9
- package/lib/utils/merge-array.js +2 -6
- package/lib/utils/resolve-namespace.d.ts +4 -4
- package/lib/utils/resolve-namespace.js +4 -9
- package/lib/utils/{validateAriaVersion.d.ts → validate-aria-version.d.ts} +1 -1
- package/lib/utils/validate-aria-version.js +4 -0
- package/package.json +20 -14
- package/lib/utils/validateAriaVersion.js +0 -8
- package/test/dom-traverse/accname-computation.spec.js +0 -69
- package/test/dom-traverse/get-computed-aria-props.spec.js +0 -758
- package/test/dom-traverse/get-computed-role.spec.js +0 -315
- package/test/dom-traverse/get-implicit-role.spec.js +0 -40
- package/test/dom-traverse/has-required-owned-elements.spec.js +0 -34
- package/test/dom-traverse/is-exposed.spec.js +0 -70
- package/test/dom-traverse/matches-context-role.spec.js +0 -60
- package/test/specs/get-attr-specs.spec.js +0 -41
- package/test/specs/get-implicit-role.spec.js +0 -79
- package/test/specs/get-permitted-roles.spec.js +0 -418
- package/test/specs/get-role-spec.spec.js +0 -67
- package/test/specs/get-spec-by-tag-name.spec.js +0 -68
- package/test/specs/resolve-version.spec.js +0 -34
- package/test/specs/schema-to-spec.spec.js +0 -61
- package/test/utils/resolve-namespace.spec.js +0 -37
package/lib/types/aria.d.ts
CHANGED
|
@@ -10,162 +10,148 @@ export type ImplicitRole = false | string;
|
|
|
10
10
|
/**
|
|
11
11
|
* If `true`, this mean is "Any". If `false`, this mean is "No".
|
|
12
12
|
*/
|
|
13
|
-
export type PermittedRoles =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
name: string;
|
|
19
|
-
deprecated?: true;
|
|
20
|
-
[k: string]: unknown;
|
|
21
|
-
}
|
|
22
|
-
)[]
|
|
23
|
-
| PermittedARIAAAMInfo;
|
|
13
|
+
export type PermittedRoles = boolean | (string | {
|
|
14
|
+
name: string;
|
|
15
|
+
deprecated?: true;
|
|
16
|
+
[k: string]: unknown;
|
|
17
|
+
})[] | PermittedARIAAAMInfo;
|
|
24
18
|
/**
|
|
25
19
|
* If set false:
|
|
26
20
|
* > No role or aria-* attributes
|
|
27
21
|
*/
|
|
28
|
-
export type PermittedARIAProperties =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
value?: string;
|
|
72
|
-
alt?: {
|
|
73
|
-
method: 'remove-attr' | 'set-attr';
|
|
74
|
-
target: string;
|
|
75
|
-
};
|
|
76
|
-
}[],
|
|
77
|
-
];
|
|
78
|
-
};
|
|
22
|
+
export type PermittedARIAProperties = false | {
|
|
23
|
+
global?: true;
|
|
24
|
+
/**
|
|
25
|
+
* Set true if the spec says "and any aria-* attributes applicable to the allowed roles."
|
|
26
|
+
*/
|
|
27
|
+
role?: true | string | [string, ...string[]];
|
|
28
|
+
/**
|
|
29
|
+
* @minItems 1
|
|
30
|
+
*/
|
|
31
|
+
only?: [
|
|
32
|
+
(string | {
|
|
33
|
+
name: string;
|
|
34
|
+
value?: string;
|
|
35
|
+
}),
|
|
36
|
+
...(string | {
|
|
37
|
+
name: string;
|
|
38
|
+
value?: string;
|
|
39
|
+
})[]
|
|
40
|
+
];
|
|
41
|
+
/**
|
|
42
|
+
* @minItems 1
|
|
43
|
+
*/
|
|
44
|
+
without?: [
|
|
45
|
+
{
|
|
46
|
+
type: 'not-recommended' | 'should-not' | 'must-not';
|
|
47
|
+
name: string;
|
|
48
|
+
value?: string;
|
|
49
|
+
alt?: {
|
|
50
|
+
method: 'remove-attr' | 'set-attr';
|
|
51
|
+
target: string;
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
...{
|
|
55
|
+
type: 'not-recommended' | 'should-not' | 'must-not';
|
|
56
|
+
name: string;
|
|
57
|
+
value?: string;
|
|
58
|
+
alt?: {
|
|
59
|
+
method: 'remove-attr' | 'set-attr';
|
|
60
|
+
target: string;
|
|
61
|
+
};
|
|
62
|
+
}[]
|
|
63
|
+
];
|
|
64
|
+
};
|
|
79
65
|
export interface AriaSchema {
|
|
80
|
-
|
|
81
|
-
|
|
66
|
+
_?: ARIA;
|
|
67
|
+
[k: string]: unknown;
|
|
82
68
|
}
|
|
83
69
|
export interface ARIA {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
70
|
+
implicitRole: ImplicitRole;
|
|
71
|
+
permittedRoles: PermittedRoles;
|
|
72
|
+
namingProhibited?: true;
|
|
73
|
+
implicitProperties?: ImplicitProperties;
|
|
74
|
+
properties?: PermittedARIAProperties;
|
|
75
|
+
conditions?: {
|
|
76
|
+
/**
|
|
77
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
78
|
+
* via the `patternProperty` ".+".
|
|
79
|
+
*/
|
|
80
|
+
[k: string]: {
|
|
81
|
+
implicitRole?: ImplicitRole;
|
|
82
|
+
permittedRoles?: PermittedRoles;
|
|
83
|
+
namingProhibited?: true;
|
|
84
|
+
implicitProperties?: ImplicitProperties;
|
|
85
|
+
properties?: PermittedARIAProperties;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
'1.3'?: {
|
|
89
|
+
implicitRole?: ImplicitRole;
|
|
90
|
+
permittedRoles?: PermittedRoles;
|
|
91
|
+
namingProhibited?: true;
|
|
92
|
+
implicitProperties?: ImplicitProperties;
|
|
93
|
+
properties?: PermittedARIAProperties;
|
|
94
|
+
conditions?: {
|
|
95
|
+
/**
|
|
96
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
97
|
+
* via the `patternProperty` ".+".
|
|
98
|
+
*/
|
|
99
|
+
[k: string]: {
|
|
100
|
+
implicitRole?: ImplicitRole;
|
|
101
|
+
permittedRoles?: PermittedRoles;
|
|
102
|
+
namingProhibited?: true;
|
|
103
|
+
implicitProperties?: ImplicitProperties;
|
|
104
|
+
properties?: PermittedARIAProperties;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
'1.2'?: {
|
|
109
|
+
implicitRole?: ImplicitRole;
|
|
110
|
+
permittedRoles?: PermittedRoles;
|
|
111
|
+
namingProhibited?: true;
|
|
112
|
+
implicitProperties?: ImplicitProperties;
|
|
113
|
+
properties?: PermittedARIAProperties;
|
|
114
|
+
conditions?: {
|
|
115
|
+
/**
|
|
116
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
117
|
+
* via the `patternProperty` ".+".
|
|
118
|
+
*/
|
|
119
|
+
[k: string]: {
|
|
120
|
+
implicitRole?: ImplicitRole;
|
|
121
|
+
permittedRoles?: PermittedRoles;
|
|
122
|
+
namingProhibited?: true;
|
|
123
|
+
implicitProperties?: ImplicitProperties;
|
|
124
|
+
properties?: PermittedARIAProperties;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
'1.1'?: {
|
|
129
|
+
implicitRole?: ImplicitRole;
|
|
130
|
+
permittedRoles?: PermittedRoles;
|
|
131
|
+
implicitProperties?: ImplicitProperties;
|
|
132
|
+
properties?: PermittedARIAProperties;
|
|
133
|
+
conditions?: {
|
|
134
|
+
/**
|
|
135
|
+
* This interface was referenced by `undefined`'s JSON-Schema definition
|
|
136
|
+
* via the `patternProperty` ".+".
|
|
137
|
+
*/
|
|
138
|
+
[k: string]: {
|
|
139
|
+
implicitRole?: ImplicitRole;
|
|
140
|
+
permittedRoles?: PermittedRoles;
|
|
141
|
+
implicitProperties?: ImplicitProperties;
|
|
142
|
+
properties?: PermittedARIAProperties;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
};
|
|
160
146
|
}
|
|
161
147
|
export interface PermittedARIAAAMInfo {
|
|
162
|
-
|
|
163
|
-
|
|
148
|
+
'core-aam'?: true;
|
|
149
|
+
'graphics-aam'?: true;
|
|
164
150
|
}
|
|
165
151
|
export interface ImplicitProperties {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
152
|
+
/**
|
|
153
|
+
* This interface was referenced by `ImplicitProperties`'s JSON-Schema definition
|
|
154
|
+
* via the `patternProperty` "^aria-.+".
|
|
155
|
+
*/
|
|
156
|
+
[k: string]: string;
|
|
171
157
|
}
|
package/lib/types/aria.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* This file was automatically generated by json-schema-to-typescript.
|
|
4
3
|
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
4
|
* and run json-schema-to-typescript to regenerate this file.
|
|
6
5
|
*/
|
|
7
|
-
|
|
6
|
+
export {};
|