abledom 0.6.5 → 0.7.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/dist/esm/index.js +473 -163
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.cts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +473 -163
- package/dist/index.js.map +1 -1
- package/dist/ts3.9/index.d.ts +15 -0
- package/package.json +9 -9
package/dist/index.d.cts
CHANGED
|
@@ -41,6 +41,11 @@ declare abstract class ValidationRule<N extends ValidationIssue = ValidationIssu
|
|
|
41
41
|
* till it is dismissed.
|
|
42
42
|
*/
|
|
43
43
|
abstract anchored: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* A short friendly group name for grouping issues in the UI.
|
|
46
|
+
* If undefined, the issue will not be grouped.
|
|
47
|
+
*/
|
|
48
|
+
groupName: string | undefined;
|
|
44
49
|
/**
|
|
45
50
|
* Window is set when the rule is added to the AbleDOM instance.
|
|
46
51
|
*/
|
|
@@ -125,6 +130,7 @@ declare class AtomicRule extends ValidationRule {
|
|
|
125
130
|
type: ValidationRuleType;
|
|
126
131
|
name: string;
|
|
127
132
|
anchored: boolean;
|
|
133
|
+
groupName: string;
|
|
128
134
|
accept(element: HTMLElement): boolean;
|
|
129
135
|
validate(element: HTMLElement): ValidationResult | null;
|
|
130
136
|
}
|
|
@@ -138,6 +144,7 @@ declare class FocusableElementLabelRule extends ValidationRule {
|
|
|
138
144
|
type: ValidationRuleType;
|
|
139
145
|
name: string;
|
|
140
146
|
anchored: boolean;
|
|
147
|
+
groupName: string;
|
|
141
148
|
private _isAriaHidden;
|
|
142
149
|
private _hasLabel;
|
|
143
150
|
accept(element: HTMLElement): boolean;
|
|
@@ -148,6 +155,7 @@ declare class ContrastRule extends ValidationRule {
|
|
|
148
155
|
type: ValidationRuleType;
|
|
149
156
|
name: string;
|
|
150
157
|
anchored: boolean;
|
|
158
|
+
groupName: string;
|
|
151
159
|
accept(element: HTMLElement): boolean;
|
|
152
160
|
validate(element: HTMLElement): ValidationResult | null;
|
|
153
161
|
}
|
|
@@ -161,6 +169,7 @@ declare class ExistingIdRule extends ValidationRule {
|
|
|
161
169
|
type: ValidationRuleType;
|
|
162
170
|
name: string;
|
|
163
171
|
anchored: boolean;
|
|
172
|
+
groupName: string;
|
|
164
173
|
accept(element: HTMLElement): boolean;
|
|
165
174
|
validate(element: HTMLElement): ValidationResult | null;
|
|
166
175
|
}
|
|
@@ -174,6 +183,7 @@ declare class FocusLostRule extends ValidationRule<BlurIssue> {
|
|
|
174
183
|
type: ValidationRuleType;
|
|
175
184
|
name: string;
|
|
176
185
|
anchored: boolean;
|
|
186
|
+
groupName: string;
|
|
177
187
|
private _focusLostTimeout;
|
|
178
188
|
private _clearScheduledFocusLost;
|
|
179
189
|
private _focusedElement;
|
|
@@ -198,6 +208,7 @@ declare class BadFocusRule extends ValidationRule {
|
|
|
198
208
|
type: ValidationRuleType;
|
|
199
209
|
name: string;
|
|
200
210
|
anchored: boolean;
|
|
211
|
+
groupName: string;
|
|
201
212
|
private _lastFocusStack;
|
|
202
213
|
private _lastBlurStack;
|
|
203
214
|
private _clearCheckTimer;
|
|
@@ -215,6 +226,7 @@ declare class FindElementRule extends ValidationRule {
|
|
|
215
226
|
type: ValidationRuleType;
|
|
216
227
|
name: string;
|
|
217
228
|
anchored: boolean;
|
|
229
|
+
groupName: string;
|
|
218
230
|
private _conditions;
|
|
219
231
|
addCondition(name: string, condition: (element: HTMLElement) => boolean): void;
|
|
220
232
|
removeCondition(name: string): void;
|
|
@@ -242,6 +254,7 @@ declare class RequiredParentRule extends ValidationRule {
|
|
|
242
254
|
type: ValidationRuleType;
|
|
243
255
|
name: string;
|
|
244
256
|
anchored: boolean;
|
|
257
|
+
groupName: string;
|
|
245
258
|
private parentRequirements;
|
|
246
259
|
accept(element: HTMLElement): boolean;
|
|
247
260
|
validate(element: HTMLElement): ValidationResult | null;
|
|
@@ -258,6 +271,7 @@ declare class NestedInteractiveElementRule extends ValidationRule {
|
|
|
258
271
|
type: ValidationRuleType;
|
|
259
272
|
name: string;
|
|
260
273
|
anchored: boolean;
|
|
274
|
+
groupName: string;
|
|
261
275
|
private _isAriaHidden;
|
|
262
276
|
private _isInteractive;
|
|
263
277
|
private _findNestedInteractive;
|
|
@@ -274,6 +288,7 @@ declare class TabIndexRule extends ValidationRule {
|
|
|
274
288
|
type: ValidationRuleType;
|
|
275
289
|
name: string;
|
|
276
290
|
anchored: boolean;
|
|
291
|
+
groupName: string;
|
|
277
292
|
accept(element: HTMLElement): boolean;
|
|
278
293
|
private isInteractiveElement;
|
|
279
294
|
validate(element: HTMLElement): ValidationResult | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,11 @@ declare abstract class ValidationRule<N extends ValidationIssue = ValidationIssu
|
|
|
41
41
|
* till it is dismissed.
|
|
42
42
|
*/
|
|
43
43
|
abstract anchored: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* A short friendly group name for grouping issues in the UI.
|
|
46
|
+
* If undefined, the issue will not be grouped.
|
|
47
|
+
*/
|
|
48
|
+
groupName: string | undefined;
|
|
44
49
|
/**
|
|
45
50
|
* Window is set when the rule is added to the AbleDOM instance.
|
|
46
51
|
*/
|
|
@@ -125,6 +130,7 @@ declare class AtomicRule extends ValidationRule {
|
|
|
125
130
|
type: ValidationRuleType;
|
|
126
131
|
name: string;
|
|
127
132
|
anchored: boolean;
|
|
133
|
+
groupName: string;
|
|
128
134
|
accept(element: HTMLElement): boolean;
|
|
129
135
|
validate(element: HTMLElement): ValidationResult | null;
|
|
130
136
|
}
|
|
@@ -138,6 +144,7 @@ declare class FocusableElementLabelRule extends ValidationRule {
|
|
|
138
144
|
type: ValidationRuleType;
|
|
139
145
|
name: string;
|
|
140
146
|
anchored: boolean;
|
|
147
|
+
groupName: string;
|
|
141
148
|
private _isAriaHidden;
|
|
142
149
|
private _hasLabel;
|
|
143
150
|
accept(element: HTMLElement): boolean;
|
|
@@ -148,6 +155,7 @@ declare class ContrastRule extends ValidationRule {
|
|
|
148
155
|
type: ValidationRuleType;
|
|
149
156
|
name: string;
|
|
150
157
|
anchored: boolean;
|
|
158
|
+
groupName: string;
|
|
151
159
|
accept(element: HTMLElement): boolean;
|
|
152
160
|
validate(element: HTMLElement): ValidationResult | null;
|
|
153
161
|
}
|
|
@@ -161,6 +169,7 @@ declare class ExistingIdRule extends ValidationRule {
|
|
|
161
169
|
type: ValidationRuleType;
|
|
162
170
|
name: string;
|
|
163
171
|
anchored: boolean;
|
|
172
|
+
groupName: string;
|
|
164
173
|
accept(element: HTMLElement): boolean;
|
|
165
174
|
validate(element: HTMLElement): ValidationResult | null;
|
|
166
175
|
}
|
|
@@ -174,6 +183,7 @@ declare class FocusLostRule extends ValidationRule<BlurIssue> {
|
|
|
174
183
|
type: ValidationRuleType;
|
|
175
184
|
name: string;
|
|
176
185
|
anchored: boolean;
|
|
186
|
+
groupName: string;
|
|
177
187
|
private _focusLostTimeout;
|
|
178
188
|
private _clearScheduledFocusLost;
|
|
179
189
|
private _focusedElement;
|
|
@@ -198,6 +208,7 @@ declare class BadFocusRule extends ValidationRule {
|
|
|
198
208
|
type: ValidationRuleType;
|
|
199
209
|
name: string;
|
|
200
210
|
anchored: boolean;
|
|
211
|
+
groupName: string;
|
|
201
212
|
private _lastFocusStack;
|
|
202
213
|
private _lastBlurStack;
|
|
203
214
|
private _clearCheckTimer;
|
|
@@ -215,6 +226,7 @@ declare class FindElementRule extends ValidationRule {
|
|
|
215
226
|
type: ValidationRuleType;
|
|
216
227
|
name: string;
|
|
217
228
|
anchored: boolean;
|
|
229
|
+
groupName: string;
|
|
218
230
|
private _conditions;
|
|
219
231
|
addCondition(name: string, condition: (element: HTMLElement) => boolean): void;
|
|
220
232
|
removeCondition(name: string): void;
|
|
@@ -242,6 +254,7 @@ declare class RequiredParentRule extends ValidationRule {
|
|
|
242
254
|
type: ValidationRuleType;
|
|
243
255
|
name: string;
|
|
244
256
|
anchored: boolean;
|
|
257
|
+
groupName: string;
|
|
245
258
|
private parentRequirements;
|
|
246
259
|
accept(element: HTMLElement): boolean;
|
|
247
260
|
validate(element: HTMLElement): ValidationResult | null;
|
|
@@ -258,6 +271,7 @@ declare class NestedInteractiveElementRule extends ValidationRule {
|
|
|
258
271
|
type: ValidationRuleType;
|
|
259
272
|
name: string;
|
|
260
273
|
anchored: boolean;
|
|
274
|
+
groupName: string;
|
|
261
275
|
private _isAriaHidden;
|
|
262
276
|
private _isInteractive;
|
|
263
277
|
private _findNestedInteractive;
|
|
@@ -274,6 +288,7 @@ declare class TabIndexRule extends ValidationRule {
|
|
|
274
288
|
type: ValidationRuleType;
|
|
275
289
|
name: string;
|
|
276
290
|
anchored: boolean;
|
|
291
|
+
groupName: string;
|
|
277
292
|
accept(element: HTMLElement): boolean;
|
|
278
293
|
private isInteractiveElement;
|
|
279
294
|
validate(element: HTMLElement): ValidationResult | null;
|