@markuplint/ml-spec 3.9.0 → 3.11.0
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/constant/aria-version.d.ts +2 -2
- 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-role.d.ts +1 -6
- package/lib/dom-traverse/get-computed-role.js +49 -3
- package/lib/dom-traverse/get-content-model.d.ts +1 -26
- package/lib/dom-traverse/get-implicit-role.d.ts +1 -5
- package/lib/dom-traverse/get-non-presentational-ancestor.d.ts +4 -10
- package/lib/dom-traverse/get-permitted-roles.d.ts +3 -7
- package/lib/dom-traverse/get-spec.d.ts +1 -4
- package/lib/dom-traverse/has-required-owned-elements.d.ts +1 -7
- package/lib/dom-traverse/matches-context-role.d.ts +1 -6
- package/lib/specs/aria-specs.d.ts +4 -7
- package/lib/specs/content-model-category-to-tag-names.d.ts +1 -4
- package/lib/specs/get-aria.d.ts +1 -7
- package/lib/specs/get-attr-specs.d.ts +2 -6
- package/lib/specs/get-implicit-role.d.ts +1 -7
- package/lib/specs/get-permitted-roles.d.ts +3 -9
- package/lib/specs/get-role-spec.d.ts +3 -10
- package/lib/specs/get-spec-by-tag-name.d.ts +1 -5
- package/lib/specs/is-palpable-elements.d.ts +4 -8
- package/lib/specs/resolve-version.d.ts +1 -4
- package/lib/specs/schema-to-spec.d.ts +3 -3
- package/lib/types/aria.d.ts +133 -147
- package/lib/types/attributes.d.ts +110 -1490
- package/lib/types/index.d.ts +145 -173
- package/lib/types/permitted-structures.d.ts +35 -74
- package/lib/utils/merge-array.d.ts +4 -9
- package/lib/utils/resolve-namespace.d.ts +4 -4
- package/package.json +9 -9
- package/test/dom-traverse/get-computed-aria-props.spec.js +2 -2
- package/test/dom-traverse/get-computed-role.spec.js +25 -4
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
|
}
|