abledom 0.6.4 → 0.7.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.
@@ -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
  */
@@ -109,7 +114,7 @@ declare class AbleDOM {
109
114
  private _onFocusOut;
110
115
  private _notifyAsync;
111
116
  private _getCurrentIssues;
112
- idle(markAsRead?: boolean, timeout?: number): Promise<ValidationIssue[] | null>;
117
+ idle(markAsRead?: boolean, timeout?: number): Promise<ValidationIssue[]>;
113
118
  clearCurrentIssues(anchored?: boolean, notAnchored?: boolean): void;
114
119
  highlightElement(element: HTMLElement | null, scrollIntoView?: boolean, autoHideTime?: number): void;
115
120
  log: typeof console.error;
@@ -122,6 +127,7 @@ declare class AtomicRule extends ValidationRule {
122
127
  type: ValidationRuleType;
123
128
  name: string;
124
129
  anchored: boolean;
130
+ groupName: string;
125
131
  accept(element: HTMLElement): boolean;
126
132
  validate(element: HTMLElement): ValidationResult | null;
127
133
  }
@@ -133,6 +139,7 @@ declare class FocusableElementLabelRule extends ValidationRule {
133
139
  type: ValidationRuleType;
134
140
  name: string;
135
141
  anchored: boolean;
142
+ groupName: string;
136
143
  private _isAriaHidden;
137
144
  private _hasLabel;
138
145
  accept(element: HTMLElement): boolean;
@@ -142,6 +149,7 @@ declare class ContrastRule extends ValidationRule {
142
149
  type: ValidationRuleType;
143
150
  name: string;
144
151
  anchored: boolean;
152
+ groupName: string;
145
153
  accept(element: HTMLElement): boolean;
146
154
  validate(element: HTMLElement): ValidationResult | null;
147
155
  }
@@ -153,6 +161,7 @@ declare class ExistingIdRule extends ValidationRule {
153
161
  type: ValidationRuleType;
154
162
  name: string;
155
163
  anchored: boolean;
164
+ groupName: string;
156
165
  accept(element: HTMLElement): boolean;
157
166
  validate(element: HTMLElement): ValidationResult | null;
158
167
  }
@@ -164,6 +173,7 @@ declare class FocusLostRule extends ValidationRule<BlurIssue> {
164
173
  type: ValidationRuleType;
165
174
  name: string;
166
175
  anchored: boolean;
176
+ groupName: string;
167
177
  private _focusLostTimeout;
168
178
  private _clearScheduledFocusLost;
169
179
  private _focusedElement;
@@ -186,6 +196,7 @@ declare class BadFocusRule extends ValidationRule {
186
196
  type: ValidationRuleType;
187
197
  name: string;
188
198
  anchored: boolean;
199
+ groupName: string;
189
200
  private _lastFocusStack;
190
201
  private _lastBlurStack;
191
202
  private _clearCheckTimer;
@@ -201,6 +212,7 @@ declare class FindElementRule extends ValidationRule {
201
212
  type: ValidationRuleType;
202
213
  name: string;
203
214
  anchored: boolean;
215
+ groupName: string;
204
216
  private _conditions;
205
217
  addCondition(name: string, condition: (element: HTMLElement) => boolean): void;
206
218
  removeCondition(name: string): void;
@@ -224,6 +236,7 @@ declare class RequiredParentRule extends ValidationRule {
224
236
  type: ValidationRuleType;
225
237
  name: string;
226
238
  anchored: boolean;
239
+ groupName: string;
227
240
  private parentRequirements;
228
241
  accept(element: HTMLElement): boolean;
229
242
  validate(element: HTMLElement): ValidationResult | null;
@@ -238,6 +251,7 @@ declare class NestedInteractiveElementRule extends ValidationRule {
238
251
  type: ValidationRuleType;
239
252
  name: string;
240
253
  anchored: boolean;
254
+ groupName: string;
241
255
  private _isAriaHidden;
242
256
  private _isInteractive;
243
257
  private _findNestedInteractive;
@@ -252,6 +266,7 @@ declare class TabIndexRule extends ValidationRule {
252
266
  type: ValidationRuleType;
253
267
  name: string;
254
268
  anchored: boolean;
269
+ groupName: string;
255
270
  accept(element: HTMLElement): boolean;
256
271
  private isInteractiveElement;
257
272
  validate(element: HTMLElement): ValidationResult | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abledom",
3
- "version": "0.6.4",
3
+ "version": "0.7.0",
4
4
  "author": "Marat Abdullin <marata@microsoft.com>",
5
5
  "description": "Continuous detection of typical web application accessibility problems.",
6
6
  "license": "MIT",
@@ -41,22 +41,22 @@
41
41
  },
42
42
  "homepage": "https://github.com/microsoft/abledom#readme",
43
43
  "devDependencies": {
44
- "@playwright/test": "^1.58.1",
45
- "@types/node": "^25.2.1",
46
- "@typescript-eslint/eslint-plugin": "^8.54.0",
47
- "@typescript-eslint/parser": "^8.54.0",
44
+ "@playwright/test": "^1.58.2",
45
+ "@types/node": "^25.4.0",
46
+ "@typescript-eslint/eslint-plugin": "^8.57.0",
47
+ "@typescript-eslint/parser": "^8.57.0",
48
48
  "@xmldom/xmldom": "^0.9.8",
49
49
  "downlevel-dts": "^0.11.0",
50
50
  "esbuild-plugin-inline-import": "^1.1.0",
51
- "eslint": "^9.39.2",
51
+ "eslint": "^9.39.4",
52
52
  "eslint-config-prettier": "^10.1.8",
53
53
  "eslint-plugin-header": "^3.1.1",
54
54
  "eslint-plugin-import": "^2.32.0",
55
- "playwright": "^1.58.1",
55
+ "playwright": "^1.58.2",
56
56
  "prettier": "^3.8.1",
57
57
  "release-it": "^19.2.4",
58
- "rimraf": "^6.1.2",
59
- "start-server-and-test": "^2.1.3",
58
+ "rimraf": "^6.1.3",
59
+ "start-server-and-test": "^2.1.5",
60
60
  "tsup": "^8.5.1",
61
61
  "typescript": "^5.9.3",
62
62
  "vite": "^7.3.1"