html-validate 8.8.0 → 8.9.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.
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.39.0"
8
+ "packageVersion": "7.39.1"
9
9
  }
10
10
  ]
11
11
  }
@@ -689,7 +689,7 @@ export declare type EventCallback = (event: string, data: any) => void;
689
689
  * @public
690
690
  */
691
691
  export declare class EventHandler {
692
- listeners: Record<string, EventCallback[]>;
692
+ private listeners;
693
693
  constructor();
694
694
  /**
695
695
  * Add an event listener.
@@ -715,6 +715,7 @@ export declare class EventHandler {
715
715
  * @param data - Event data.
716
716
  */
717
717
  trigger(event: string, data: any): void;
718
+ private getCallbacks;
718
719
  }
719
720
 
720
721
  /**
@@ -1414,6 +1415,8 @@ export declare interface MetaData {
1414
1415
  transparent?: boolean | string[];
1415
1416
  implicitClosed?: string[];
1416
1417
  scriptSupporting?: boolean;
1418
+ /** Mark element as able to receive focus (without explicit `tabindex`) */
1419
+ focusable?: boolean | MetaFocusableCallback;
1417
1420
  form?: boolean;
1418
1421
  /** Mark element as a form-associated element */
1419
1422
  formAssociated?: Partial<FormAssociated>;
@@ -1468,12 +1471,24 @@ export declare type MetaDataTable = Record<string, MetaData>;
1468
1471
  */
1469
1472
  export declare interface MetaElement extends Omit<MetaData, "deprecatedAttributes" | "requiredAttributes"> {
1470
1473
  tagName: string;
1474
+ focusable: boolean | MetaFocusableCallback;
1471
1475
  formAssociated?: FormAssociated;
1472
1476
  implicitRole: MetaImplicitRoleCallback;
1473
1477
  attributes: Record<string, MetaAttribute>;
1474
1478
  textContent?: TextContent;
1475
1479
  }
1476
1480
 
1481
+ /**
1482
+ * Callback for the `focusable` property of `MetaData`. It takes a node and
1483
+ * returns whenever the element is focusable or not.
1484
+ *
1485
+ * @public
1486
+ * @since 8.9.0
1487
+ * @param node - The node to determine if it is focusable.
1488
+ * @returns `true` if the node is focusable.
1489
+ */
1490
+ export declare type MetaFocusableCallback = (node: HtmlElementLike) => boolean;
1491
+
1477
1492
  /**
1478
1493
  * Callback for the `implicitRole` property of `MetaData`. It takes a node and
1479
1494
  * returns the implicit ARIA role, if any.
@@ -1491,7 +1506,7 @@ export declare type MetaImplicitRoleCallback = (node: HtmlElementLike) => string
1491
1506
  *
1492
1507
  * @public
1493
1508
  */
1494
- export declare type MetaLookupableProperty = "metadata" | "flow" | "sectioning" | "heading" | "phrasing" | "embedded" | "interactive" | "deprecated" | "foreign" | "void" | "transparent" | "scriptSupporting" | "form" | "formAssociated" | "labelable";
1509
+ export declare type MetaLookupableProperty = "metadata" | "flow" | "sectioning" | "heading" | "phrasing" | "embedded" | "interactive" | "deprecated" | "foreign" | "void" | "transparent" | "scriptSupporting" | "focusable" | "form" | "formAssociated" | "labelable";
1495
1510
 
1496
1511
  /**
1497
1512
  * @public
@@ -785,7 +785,7 @@ export declare type EventCallback = (event: string, data: any) => void;
785
785
  * @public
786
786
  */
787
787
  export declare class EventHandler {
788
- listeners: Record<string, EventCallback[]>;
788
+ private listeners;
789
789
  constructor();
790
790
  /**
791
791
  * Add an event listener.
@@ -811,6 +811,7 @@ export declare class EventHandler {
811
811
  * @param data - Event data.
812
812
  */
813
813
  trigger(event: string, data: any): void;
814
+ private getCallbacks;
814
815
  }
815
816
 
816
817
  /**
@@ -1639,6 +1640,8 @@ export declare interface MetaData {
1639
1640
  transparent?: boolean | string[];
1640
1641
  implicitClosed?: string[];
1641
1642
  scriptSupporting?: boolean;
1643
+ /** Mark element as able to receive focus (without explicit `tabindex`) */
1644
+ focusable?: boolean | MetaFocusableCallback;
1642
1645
  form?: boolean;
1643
1646
  /** Mark element as a form-associated element */
1644
1647
  formAssociated?: Partial<FormAssociated>;
@@ -1693,12 +1696,24 @@ export declare type MetaDataTable = Record<string, MetaData>;
1693
1696
  */
1694
1697
  export declare interface MetaElement extends Omit<MetaData, "deprecatedAttributes" | "requiredAttributes"> {
1695
1698
  tagName: string;
1699
+ focusable: boolean | MetaFocusableCallback;
1696
1700
  formAssociated?: FormAssociated;
1697
1701
  implicitRole: MetaImplicitRoleCallback;
1698
1702
  attributes: Record<string, MetaAttribute>;
1699
1703
  textContent?: TextContent;
1700
1704
  }
1701
1705
 
1706
+ /**
1707
+ * Callback for the `focusable` property of `MetaData`. It takes a node and
1708
+ * returns whenever the element is focusable or not.
1709
+ *
1710
+ * @public
1711
+ * @since 8.9.0
1712
+ * @param node - The node to determine if it is focusable.
1713
+ * @returns `true` if the node is focusable.
1714
+ */
1715
+ export declare type MetaFocusableCallback = (node: HtmlElementLike) => boolean;
1716
+
1702
1717
  /**
1703
1718
  * Callback for the `implicitRole` property of `MetaData`. It takes a node and
1704
1719
  * returns the implicit ARIA role, if any.
@@ -1716,7 +1731,7 @@ export declare type MetaImplicitRoleCallback = (node: HtmlElementLike) => string
1716
1731
  *
1717
1732
  * @public
1718
1733
  */
1719
- export declare type MetaLookupableProperty = "metadata" | "flow" | "sectioning" | "heading" | "phrasing" | "embedded" | "interactive" | "deprecated" | "foreign" | "void" | "transparent" | "scriptSupporting" | "form" | "formAssociated" | "labelable";
1734
+ export declare type MetaLookupableProperty = "metadata" | "flow" | "sectioning" | "heading" | "phrasing" | "embedded" | "interactive" | "deprecated" | "foreign" | "void" | "transparent" | "scriptSupporting" | "focusable" | "form" | "formAssociated" | "labelable";
1720
1735
 
1721
1736
  /**
1722
1737
  * @public
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-validate",
3
- "version": "8.8.0",
3
+ "version": "8.9.0",
4
4
  "description": "Offline html5 validator",
5
5
  "keywords": [
6
6
  "html",
@@ -201,15 +201,15 @@
201
201
  "semver": "^7.0.0"
202
202
  },
203
203
  "devDependencies": {
204
- "@html-validate/commitlint-config": "3.0.27",
205
- "@html-validate/eslint-config": "5.12.4",
206
- "@html-validate/eslint-config-jest": "5.12.0",
207
- "@html-validate/eslint-config-typescript": "5.12.4",
208
- "@html-validate/eslint-config-typescript-typeinfo": "5.12.4",
204
+ "@html-validate/commitlint-config": "3.0.28",
205
+ "@html-validate/eslint-config": "5.12.6",
206
+ "@html-validate/eslint-config-jest": "5.12.6",
207
+ "@html-validate/eslint-config-typescript": "5.12.6",
208
+ "@html-validate/eslint-config-typescript-typeinfo": "5.12.6",
209
209
  "@html-validate/jest-config": "3.7.7",
210
210
  "@html-validate/prettier-config": "2.4.10",
211
- "@html-validate/release-scripts": "5.0.4",
212
- "@microsoft/api-extractor": "7.39.0",
211
+ "@html-validate/release-scripts": "6.1.0",
212
+ "@microsoft/api-extractor": "7.39.1",
213
213
  "@rollup/plugin-commonjs": "25.0.7",
214
214
  "@rollup/plugin-json": "6.1.0",
215
215
  "@rollup/plugin-node-resolve": "15.2.3",
@@ -219,7 +219,7 @@
219
219
  "@types/babel__code-frame": "7.0.6",
220
220
  "@types/jest": "29.5.11",
221
221
  "@types/minimist": "1.2.5",
222
- "@types/node": "16.18.68",
222
+ "@types/node": "16.18.69",
223
223
  "@types/prompts": "2.4.9",
224
224
  "@types/semver": "7.5.6",
225
225
  "@types/stream-buffers": "3.0.7",
@@ -230,11 +230,11 @@
230
230
  "jest-diff": "29.7.0",
231
231
  "jest-environment-jsdom": "29.7.0",
232
232
  "jest-snapshot": "29.7.0",
233
- "marked": "11.1.0",
233
+ "marked": "11.1.1",
234
234
  "memfs": "4.6.0",
235
235
  "npm-pkg-lint": "2.1.0",
236
236
  "npm-run-all": "4.1.5",
237
- "rollup": "4.9.1",
237
+ "rollup": "4.9.4",
238
238
  "rollup-plugin-esbuild": "6.1.0",
239
239
  "stream-buffers": "3.0.2",
240
240
  "ts-jest": "29.1.1",
@@ -275,7 +275,7 @@
275
275
  "semver"
276
276
  ],
277
277
  "overrides": {
278
- "marked": "11.1.0"
278
+ "marked": "11.1.1"
279
279
  },
280
280
  "renovate": {
281
281
  "extends": [