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