html-validate 11.4.0 → 11.5.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.
Files changed (50) hide show
  1. package/dist/cjs/browser.js +1 -1
  2. package/dist/cjs/cli.js +7 -0
  3. package/dist/cjs/cli.js.map +1 -1
  4. package/dist/cjs/core-nodejs.js +212 -2
  5. package/dist/cjs/core-nodejs.js.map +1 -1
  6. package/dist/cjs/core.js +85 -30
  7. package/dist/cjs/core.js.map +1 -1
  8. package/dist/cjs/elements.js +429 -58
  9. package/dist/cjs/elements.js.map +1 -1
  10. package/dist/cjs/html-validate.js +1 -1
  11. package/dist/cjs/index.js +3 -1
  12. package/dist/cjs/index.js.map +1 -1
  13. package/dist/cjs/jest-worker.js +1 -1
  14. package/dist/cjs/jest.js +1 -1
  15. package/dist/cjs/presets.d.ts +1 -0
  16. package/dist/cjs/presets.js +22 -0
  17. package/dist/cjs/presets.js.map +1 -0
  18. package/dist/cjs/vitest-matchers.js +20 -4
  19. package/dist/cjs/vitest-matchers.js.map +1 -1
  20. package/dist/cjs/vitest-worker.js +1 -1
  21. package/dist/cjs/vitest.js +1 -1
  22. package/dist/esm/browser.js +2 -2
  23. package/dist/esm/cli.js +10 -3
  24. package/dist/esm/cli.js.map +1 -1
  25. package/dist/esm/core-browser.js +1 -1
  26. package/dist/esm/core-nodejs.js +212 -4
  27. package/dist/esm/core-nodejs.js.map +1 -1
  28. package/dist/esm/core.js +78 -30
  29. package/dist/esm/core.js.map +1 -1
  30. package/dist/esm/elements.js +429 -58
  31. package/dist/esm/elements.js.map +1 -1
  32. package/dist/esm/html-validate.js +3 -3
  33. package/dist/esm/index.js +3 -3
  34. package/dist/esm/jest-matchers.js +2 -2
  35. package/dist/esm/jest-utils.js +2 -2
  36. package/dist/esm/jest-worker.js +2 -2
  37. package/dist/esm/jest.js +1 -1
  38. package/dist/esm/presets.d.ts +1 -0
  39. package/dist/esm/presets.js +11 -0
  40. package/dist/esm/presets.js.map +1 -0
  41. package/dist/esm/vitest-matchers.js +23 -7
  42. package/dist/esm/vitest-matchers.js.map +1 -1
  43. package/dist/esm/vitest-utils.js +2 -2
  44. package/dist/esm/vitest-worker.js +2 -2
  45. package/dist/esm/vitest.js +1 -1
  46. package/dist/schema/elements.json +14 -1
  47. package/dist/types/browser.d.ts +88 -4
  48. package/dist/types/index.d.ts +154 -4
  49. package/dist/types/presets.d.ts +8 -0
  50. package/package.json +7 -2
@@ -8,7 +8,26 @@ const {
8
8
  allowedIfParentIsPresent,
9
9
  hasKeyword
10
10
  } = metadataHelper;
11
- const validId = "/\\S+/";
11
+ const validId = {
12
+ name: "a valid id",
13
+ pattern: /^\S+$/
14
+ };
15
+ const validPositiveInteger = {
16
+ name: "a positive integer",
17
+ pattern: /^\d+$/
18
+ };
19
+ const validNonEmptyString = {
20
+ name: "a non-empty string",
21
+ pattern: /^.+$/
22
+ };
23
+ const validBrowsingContextName = {
24
+ name: "a browsing context name (non-empty string, must not start with `_`)",
25
+ pattern: /^[^_].*$/
26
+ };
27
+ const validFloatingPoint = {
28
+ name: "a floating-point number",
29
+ pattern: /^-?(\d+(\.\d+)?|\.\d+)([Ee][+-]?\d+)?$/
30
+ };
12
31
  const ReferrerPolicy = [
13
32
  "",
14
33
  "no-referrer",
@@ -62,6 +81,7 @@ function linkBodyOk(node) {
62
81
  return tokens.some((keyword) => bodyOk.has(keyword));
63
82
  }
64
83
  var html5 = {
84
+ /* https://html.spec.whatwg.org/multipage/dom.html#global-attributes */
65
85
  "*": {
66
86
  attributes: {
67
87
  accesskey: {
@@ -199,13 +219,14 @@ var html5 = {
199
219
  },
200
220
  "xml:*": {},
201
221
  xmlns: {
202
- enum: ["/.+/"]
222
+ enum: [validNonEmptyString]
203
223
  },
204
224
  "xmlns:*": {
205
- enum: ["/.+/"]
225
+ enum: [validNonEmptyString]
206
226
  }
207
227
  }
208
228
  },
229
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element */
209
230
  a: {
210
231
  flow: true,
211
232
  focusable(node) {
@@ -232,7 +253,7 @@ var html5 = {
232
253
  download: {
233
254
  allowed: allowedIfAttributeIsPresent("href"),
234
255
  omit: true,
235
- enum: ["/.+/"]
256
+ enum: [validNonEmptyString]
236
257
  },
237
258
  href: {
238
259
  enum: ["/.*/"]
@@ -324,14 +345,14 @@ var html5 = {
324
345
  return null;
325
346
  },
326
347
  list: true,
327
- enum: ["/.+/"]
348
+ enum: [validNonEmptyString]
328
349
  },
329
350
  shape: {
330
351
  deprecated: true
331
352
  },
332
353
  target: {
333
354
  allowed: allowedIfAttributeIsPresent("href"),
334
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
355
+ enum: [validBrowsingContextName, "_blank", "_self", "_parent", "_top"]
335
356
  },
336
357
  type: {
337
358
  allowed: allowedIfAttributeIsPresent("href")
@@ -355,6 +376,7 @@ var html5 = {
355
376
  }
356
377
  }
357
378
  },
379
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-abbr-element */
358
380
  abbr: {
359
381
  flow: true,
360
382
  phrasing: true,
@@ -370,6 +392,7 @@ var html5 = {
370
392
  source: "html5"
371
393
  }
372
394
  },
395
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-address-element */
373
396
  address: {
374
397
  flow: true,
375
398
  aria: {
@@ -378,6 +401,7 @@ var html5 = {
378
401
  permittedContent: ["@flow"],
379
402
  permittedDescendants: [{ exclude: ["address", "header", "footer", "@heading", "@sectioning"] }]
380
403
  },
404
+ /* https://html.spec.whatwg.org/multipage/obsolete.html#the-applet-element */
381
405
  applet: {
382
406
  deprecated: {
383
407
  source: "html5"
@@ -391,6 +415,7 @@ var html5 = {
391
415
  }
392
416
  }
393
417
  },
418
+ /* https://html.spec.whatwg.org/multipage/image-maps.html#the-area-element */
394
419
  area: {
395
420
  flow(node) {
396
421
  return Boolean(node.closest("map"));
@@ -517,7 +542,7 @@ var html5 = {
517
542
  },
518
543
  target: {
519
544
  allowed: allowedIfAttributeIsPresent("href"),
520
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
545
+ enum: [validBrowsingContextName, "_blank", "_self", "_parent", "_top"]
521
546
  }
522
547
  },
523
548
  aria: {
@@ -530,6 +555,7 @@ var html5 = {
530
555
  },
531
556
  requiredAncestors: ["map", "template"]
532
557
  },
558
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-article-element */
533
559
  article: {
534
560
  flow: true,
535
561
  sectioning: true,
@@ -539,6 +565,7 @@ var html5 = {
539
565
  implicitRole: "article"
540
566
  }
541
567
  },
568
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-aside-element */
542
569
  aside: {
543
570
  flow: true,
544
571
  sectioning: true,
@@ -548,6 +575,7 @@ var html5 = {
548
575
  implicitRole: "complementary"
549
576
  }
550
577
  },
578
+ /* https://html.spec.whatwg.org/multipage/media.html#the-audio-element */
551
579
  audio: {
552
580
  flow: true,
553
581
  focusable(node) {
@@ -560,6 +588,12 @@ var html5 = {
560
588
  },
561
589
  transparent: ["@flow"],
562
590
  attributes: {
591
+ autoplay: {
592
+ boolean: true
593
+ },
594
+ controls: {
595
+ boolean: true
596
+ },
563
597
  crossorigin: {
564
598
  omit: true,
565
599
  enum: ["anonymous", "use-credentials"]
@@ -567,15 +601,25 @@ var html5 = {
567
601
  itemprop: {
568
602
  allowed: allowedIfAttributeIsPresent("src")
569
603
  },
604
+ loop: {
605
+ boolean: true
606
+ },
607
+ muted: {
608
+ boolean: true
609
+ },
570
610
  preload: {
571
611
  omit: true,
572
612
  enum: ["none", "metadata", "auto"]
613
+ },
614
+ src: {
615
+ enum: [validNonEmptyString]
573
616
  }
574
617
  },
575
618
  permittedContent: ["@flow", "track", "source"],
576
619
  permittedDescendants: [{ exclude: ["audio", "video"] }],
577
620
  permittedOrder: ["source", "track", "@flow"]
578
621
  },
622
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-b-element */
579
623
  b: {
580
624
  flow: true,
581
625
  phrasing: true,
@@ -585,9 +629,14 @@ var html5 = {
585
629
  naming: "prohibited"
586
630
  }
587
631
  },
632
+ /* https://html.spec.whatwg.org/multipage/document-metadata.html#the-base-element */
588
633
  base: {
589
634
  metadata: true,
590
635
  void: true,
636
+ attributes: {
637
+ href: {},
638
+ target: {}
639
+ },
591
640
  permittedParent: ["head"],
592
641
  aria: {
593
642
  naming: "prohibited"
@@ -600,6 +649,7 @@ var html5 = {
600
649
  source: "html4"
601
650
  }
602
651
  },
652
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-bdi-element */
603
653
  bdi: {
604
654
  flow: true,
605
655
  phrasing: true,
@@ -609,6 +659,7 @@ var html5 = {
609
659
  naming: "prohibited"
610
660
  }
611
661
  },
662
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-bdo-element */
612
663
  bdo: {
613
664
  flow: true,
614
665
  phrasing: true,
@@ -638,14 +689,19 @@ var html5 = {
638
689
  source: "non-standard"
639
690
  }
640
691
  },
692
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-blockquote-element */
641
693
  blockquote: {
642
694
  flow: true,
643
695
  sectioning: true,
696
+ attributes: {
697
+ cite: {}
698
+ },
644
699
  aria: {
645
700
  implicitRole: "blockquote"
646
701
  },
647
702
  permittedContent: ["@flow"]
648
703
  },
704
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-body-element */
649
705
  body: {
650
706
  optionalEnd: true,
651
707
  permittedContent: ["@flow"],
@@ -693,6 +749,7 @@ var html5 = {
693
749
  naming: "prohibited"
694
750
  }
695
751
  },
752
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-br-element */
696
753
  br: {
697
754
  flow: true,
698
755
  phrasing: true,
@@ -706,6 +763,7 @@ var html5 = {
706
763
  naming: "prohibited"
707
764
  }
708
765
  },
766
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element */
709
767
  button: {
710
768
  flow: true,
711
769
  focusable: true,
@@ -724,6 +782,21 @@ var html5 = {
724
782
  autofocus: {
725
783
  boolean: true
726
784
  },
785
+ command: {
786
+ enum: [
787
+ "toggle-popover",
788
+ "show-popover",
789
+ "hide-popover",
790
+ "close",
791
+ "request-close",
792
+ "show-modal",
793
+ "/^--/"
794
+ ]
795
+ },
796
+ commandfor: {
797
+ enum: [validId],
798
+ reference: "id"
799
+ },
727
800
  datafld: {
728
801
  deprecated: true
729
802
  },
@@ -736,6 +809,10 @@ var html5 = {
736
809
  disabled: {
737
810
  boolean: true
738
811
  },
812
+ form: {
813
+ enum: [validId],
814
+ reference: "id"
815
+ },
739
816
  formaction: {
740
817
  allowed: allowedIfAttributeHasValue("type", ["submit"], { defaultValue: "submit" })
741
818
  },
@@ -752,11 +829,22 @@ var html5 = {
752
829
  },
753
830
  formtarget: {
754
831
  allowed: allowedIfAttributeHasValue("type", ["submit"], { defaultValue: "submit" }),
755
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
832
+ enum: [validBrowsingContextName, "_blank", "_self", "_parent", "_top"]
833
+ },
834
+ name: {
835
+ enum: [validNonEmptyString]
836
+ },
837
+ popovertarget: {
838
+ enum: [validId],
839
+ reference: "id"
840
+ },
841
+ popovertargetaction: {
842
+ enum: ["toggle", "show", "hide"]
756
843
  },
757
844
  type: {
758
845
  enum: ["submit", "reset", "button"]
759
- }
846
+ },
847
+ value: {}
760
848
  },
761
849
  aria: {
762
850
  implicitRole: "button"
@@ -765,12 +853,14 @@ var html5 = {
765
853
  permittedDescendants: [{ exclude: ["@interactive"] }],
766
854
  textContent: "accessible"
767
855
  },
856
+ /* https://html.spec.whatwg.org/multipage/canvas.html#the-canvas-element */
768
857
  canvas: {
769
858
  flow: true,
770
859
  phrasing: true,
771
860
  embedded: true,
772
861
  transparent: true
773
862
  },
863
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-caption-element */
774
864
  caption: {
775
865
  implicitClosed: ["colgroup", "thead", "tfoot", "tbody", "tr"],
776
866
  optionalEnd: true,
@@ -793,6 +883,7 @@ var html5 = {
793
883
  source: "html4"
794
884
  }
795
885
  },
886
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-cite-element */
796
887
  cite: {
797
888
  flow: true,
798
889
  phrasing: true,
@@ -801,6 +892,7 @@ var html5 = {
801
892
  naming: "prohibited"
802
893
  }
803
894
  },
895
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-code-element */
804
896
  code: {
805
897
  flow: true,
806
898
  phrasing: true,
@@ -810,6 +902,7 @@ var html5 = {
810
902
  naming: "prohibited"
811
903
  }
812
904
  },
905
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-col-element */
813
906
  col: {
814
907
  attributes: {
815
908
  align: {
@@ -822,7 +915,7 @@ var html5 = {
822
915
  deprecated: true
823
916
  },
824
917
  span: {
825
- enum: ["/\\d+/"]
918
+ enum: [validPositiveInteger]
826
919
  },
827
920
  valign: {
828
921
  deprecated: true
@@ -836,11 +929,12 @@ var html5 = {
836
929
  naming: "prohibited"
837
930
  }
838
931
  },
932
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-colgroup-element */
839
933
  colgroup: {
840
934
  implicitClosed: ["colgroup", "caption", "thead", "tbody", "tfoot", "tr"],
841
935
  attributes: {
842
936
  span: {
843
- enum: ["/\\d+/"]
937
+ enum: [validPositiveInteger]
844
938
  }
845
939
  },
846
940
  permittedContent: ["col", "template"],
@@ -848,15 +942,20 @@ var html5 = {
848
942
  naming: "prohibited"
849
943
  }
850
944
  },
945
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-data-element */
851
946
  data: {
852
947
  flow: true,
853
948
  phrasing: true,
949
+ attributes: {
950
+ value: {}
951
+ },
854
952
  permittedContent: ["@phrasing"],
855
953
  aria: {
856
954
  implicitRole: "generic",
857
955
  naming: "prohibited"
858
956
  }
859
957
  },
958
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-datalist-element */
860
959
  datalist: {
861
960
  flow: true,
862
961
  phrasing: true,
@@ -866,25 +965,33 @@ var html5 = {
866
965
  },
867
966
  permittedContent: ["@phrasing", "option"]
868
967
  },
968
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-dd-element */
869
969
  dd: {
870
970
  implicitClosed: ["dd", "dt"],
871
971
  permittedContent: ["@flow"],
872
972
  requiredAncestors: ["dl > dd", "dl > div > dd", "template > dd", "template > div > dd"]
873
973
  },
974
+ /* https://html.spec.whatwg.org/multipage/edits.html#the-del-element */
874
975
  del: {
875
976
  flow: true,
876
977
  phrasing: true,
877
978
  transparent: true,
979
+ attributes: {
980
+ cite: {},
981
+ datetime: {}
982
+ },
878
983
  aria: {
879
984
  implicitRole: "deletion",
880
985
  naming: "prohibited"
881
986
  }
882
987
  },
988
+ /* https://html.spec.whatwg.org/multipage/interactive-elements.html#the-details-element */
883
989
  details: {
884
990
  flow: true,
885
991
  sectioning: true,
886
992
  interactive: true,
887
993
  attributes: {
994
+ name: {},
888
995
  open: {
889
996
  boolean: true
890
997
  }
@@ -896,6 +1003,7 @@ var html5 = {
896
1003
  permittedOrder: ["summary", "@flow"],
897
1004
  requiredContent: ["summary"]
898
1005
  },
1006
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-dfn-element */
899
1007
  dfn: {
900
1008
  flow: true,
901
1009
  phrasing: true,
@@ -905,10 +1013,15 @@ var html5 = {
905
1013
  permittedContent: ["@phrasing"],
906
1014
  permittedDescendants: [{ exclude: ["dfn"] }]
907
1015
  },
1016
+ /* https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element */
908
1017
  dialog: {
909
1018
  flow: true,
910
1019
  permittedContent: ["@flow"],
911
1020
  attributes: {
1021
+ closedby: {
1022
+ omit: true,
1023
+ enum: ["any", "closerequest", "none"]
1024
+ },
912
1025
  open: {
913
1026
  boolean: true
914
1027
  }
@@ -923,6 +1036,7 @@ var html5 = {
923
1036
  source: "html4"
924
1037
  }
925
1038
  },
1039
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-div-element */
926
1040
  div: {
927
1041
  flow: true,
928
1042
  permittedContent: ["@flow", "dt", "dd"],
@@ -945,6 +1059,7 @@ var html5 = {
945
1059
  naming: "prohibited"
946
1060
  }
947
1061
  },
1062
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element */
948
1063
  dl: {
949
1064
  flow: true,
950
1065
  permittedContent: ["@script", "dt", "dd", "div"],
@@ -954,12 +1069,14 @@ var html5 = {
954
1069
  }
955
1070
  }
956
1071
  },
1072
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-dt-element */
957
1073
  dt: {
958
1074
  implicitClosed: ["dd", "dt"],
959
1075
  permittedContent: ["@flow"],
960
1076
  permittedDescendants: [{ exclude: ["header", "footer", "@sectioning", "@heading"] }],
961
1077
  requiredAncestors: ["dl > dt", "dl > div > dt", "template > dt", "template > div > dt"]
962
1078
  },
1079
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-em-element */
963
1080
  em: {
964
1081
  flow: true,
965
1082
  phrasing: true,
@@ -969,6 +1086,7 @@ var html5 = {
969
1086
  naming: "prohibited"
970
1087
  }
971
1088
  },
1089
+ /* https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-embed-element */
972
1090
  embed: {
973
1091
  flow: true,
974
1092
  phrasing: true,
@@ -977,20 +1095,21 @@ var html5 = {
977
1095
  void: true,
978
1096
  attributes: {
979
1097
  height: {
980
- enum: ["/\\d+/"]
1098
+ enum: [validPositiveInteger]
981
1099
  },
982
1100
  src: {
983
1101
  required: true,
984
- enum: ["/.+/"]
1102
+ enum: [validNonEmptyString]
985
1103
  },
986
1104
  title: {
987
1105
  required: true
988
1106
  },
989
1107
  width: {
990
- enum: ["/\\d+/"]
1108
+ enum: [validPositiveInteger]
991
1109
  }
992
1110
  }
993
1111
  },
1112
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-fieldset-element */
994
1113
  fieldset: {
995
1114
  flow: true,
996
1115
  formAssociated: {
@@ -1003,6 +1122,13 @@ var html5 = {
1003
1122
  },
1004
1123
  disabled: {
1005
1124
  boolean: true
1125
+ },
1126
+ form: {
1127
+ enum: [validId],
1128
+ reference: "id"
1129
+ },
1130
+ name: {
1131
+ enum: [validNonEmptyString]
1006
1132
  }
1007
1133
  },
1008
1134
  aria: {
@@ -1011,12 +1137,14 @@ var html5 = {
1011
1137
  permittedContent: ["@flow", "legend?"],
1012
1138
  permittedOrder: ["legend", "@flow"]
1013
1139
  },
1140
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-figcaption-element */
1014
1141
  figcaption: {
1015
1142
  permittedContent: ["@flow"],
1016
1143
  aria: {
1017
1144
  naming: "prohibited"
1018
1145
  }
1019
1146
  },
1147
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-figure-element */
1020
1148
  figure: {
1021
1149
  flow: true,
1022
1150
  aria: {
@@ -1032,6 +1160,7 @@ var html5 = {
1032
1160
  source: "html4"
1033
1161
  }
1034
1162
  },
1163
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-footer-element */
1035
1164
  footer: {
1036
1165
  flow: true,
1037
1166
  aria: {
@@ -1053,22 +1182,28 @@ var html5 = {
1053
1182
  permittedContent: ["@flow"],
1054
1183
  permittedDescendants: [{ exclude: ["header", "footer", "main"] }]
1055
1184
  },
1185
+ /* https://html.spec.whatwg.org/multipage/forms.html#the-form-element */
1056
1186
  form: {
1057
1187
  flow: true,
1058
1188
  form: true,
1059
1189
  attributes: {
1060
- action: {
1061
- enum: [/^\s*\S+\s*$/]
1062
- },
1063
1190
  accept: {
1064
1191
  deprecated: true
1065
1192
  },
1193
+ "accept-charset": {},
1194
+ action: {
1195
+ enum: [/^\s*\S+\s*$/]
1196
+ },
1066
1197
  autocomplete: {
1067
1198
  enum: ["on", "off"]
1068
1199
  },
1200
+ enctype: {
1201
+ enum: ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]
1202
+ },
1069
1203
  method: {
1070
1204
  enum: ["get", "post", "dialog"]
1071
1205
  },
1206
+ name: {},
1072
1207
  novalidate: {
1073
1208
  boolean: true
1074
1209
  },
@@ -1106,10 +1241,10 @@ var html5 = {
1106
1241
  return null;
1107
1242
  },
1108
1243
  list: true,
1109
- enum: ["/.+/"]
1244
+ enum: [validNonEmptyString]
1110
1245
  },
1111
1246
  target: {
1112
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
1247
+ enum: [validBrowsingContextName, "_blank", "_self", "_parent", "_top"]
1113
1248
  }
1114
1249
  },
1115
1250
  aria: {
@@ -1141,6 +1276,7 @@ var html5 = {
1141
1276
  source: "html5"
1142
1277
  }
1143
1278
  },
1279
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1144
1280
  h1: {
1145
1281
  flow: true,
1146
1282
  heading: true,
@@ -1154,6 +1290,7 @@ var html5 = {
1154
1290
  implicitRole: "heading"
1155
1291
  }
1156
1292
  },
1293
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1157
1294
  h2: {
1158
1295
  flow: true,
1159
1296
  heading: true,
@@ -1167,6 +1304,7 @@ var html5 = {
1167
1304
  implicitRole: "heading"
1168
1305
  }
1169
1306
  },
1307
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1170
1308
  h3: {
1171
1309
  flow: true,
1172
1310
  heading: true,
@@ -1180,6 +1318,7 @@ var html5 = {
1180
1318
  implicitRole: "heading"
1181
1319
  }
1182
1320
  },
1321
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1183
1322
  h4: {
1184
1323
  flow: true,
1185
1324
  heading: true,
@@ -1193,6 +1332,7 @@ var html5 = {
1193
1332
  implicitRole: "heading"
1194
1333
  }
1195
1334
  },
1335
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1196
1336
  h5: {
1197
1337
  flow: true,
1198
1338
  heading: true,
@@ -1206,6 +1346,7 @@ var html5 = {
1206
1346
  implicitRole: "heading"
1207
1347
  }
1208
1348
  },
1349
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1209
1350
  h6: {
1210
1351
  flow: true,
1211
1352
  heading: true,
@@ -1219,6 +1360,7 @@ var html5 = {
1219
1360
  implicitRole: "heading"
1220
1361
  }
1221
1362
  },
1363
+ /* https://html.spec.whatwg.org/multipage/document-metadata.html#the-head-element */
1222
1364
  head: {
1223
1365
  implicitClosed: ["body", "@flow-not-meta"],
1224
1366
  optionalEnd: true,
@@ -1234,6 +1376,7 @@ var html5 = {
1234
1376
  naming: "prohibited"
1235
1377
  }
1236
1378
  },
1379
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-header-element */
1237
1380
  header: {
1238
1381
  flow: true,
1239
1382
  aria: {
@@ -1255,6 +1398,7 @@ var html5 = {
1255
1398
  permittedContent: ["@flow"],
1256
1399
  permittedDescendants: [{ exclude: ["header", "footer", "main"] }]
1257
1400
  },
1401
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-hgroup-element */
1258
1402
  hgroup: {
1259
1403
  flow: true,
1260
1404
  heading: true,
@@ -1265,6 +1409,7 @@ var html5 = {
1265
1409
  implicitRole: "group"
1266
1410
  }
1267
1411
  },
1412
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-hr-element */
1268
1413
  hr: {
1269
1414
  flow: true,
1270
1415
  void: true,
@@ -1289,6 +1434,7 @@ var html5 = {
1289
1434
  implicitRole: "separator"
1290
1435
  }
1291
1436
  },
1437
+ /* https://html.spec.whatwg.org/multipage/semantics.html#the-html-element */
1292
1438
  html: {
1293
1439
  implicitOpen: [
1294
1440
  { for: ["@meta"], open: "head" },
@@ -1311,6 +1457,7 @@ var html5 = {
1311
1457
  naming: "prohibited"
1312
1458
  }
1313
1459
  },
1460
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-i-element */
1314
1461
  i: {
1315
1462
  flow: true,
1316
1463
  phrasing: true,
@@ -1320,6 +1467,7 @@ var html5 = {
1320
1467
  naming: "prohibited"
1321
1468
  }
1322
1469
  },
1470
+ /* https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element */
1323
1471
  iframe: {
1324
1472
  flow: true,
1325
1473
  phrasing: true,
@@ -1342,7 +1490,7 @@ var html5 = {
1342
1490
  deprecated: true
1343
1491
  },
1344
1492
  height: {
1345
- enum: ["/\\d+/"]
1493
+ enum: [validPositiveInteger]
1346
1494
  },
1347
1495
  hspace: {
1348
1496
  deprecated: true
@@ -1360,7 +1508,7 @@ var html5 = {
1360
1508
  deprecated: true
1361
1509
  },
1362
1510
  src: {
1363
- enum: ["/.+/"]
1511
+ enum: [validNonEmptyString]
1364
1512
  },
1365
1513
  title: {
1366
1514
  required: true
@@ -1369,11 +1517,12 @@ var html5 = {
1369
1517
  deprecated: true
1370
1518
  },
1371
1519
  width: {
1372
- enum: ["/\\d+/"]
1520
+ enum: [validPositiveInteger]
1373
1521
  }
1374
1522
  },
1375
1523
  permittedContent: []
1376
1524
  },
1525
+ /* https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element */
1377
1526
  img: {
1378
1527
  flow: true,
1379
1528
  phrasing: true,
@@ -1386,6 +1535,7 @@ var html5 = {
1386
1535
  align: {
1387
1536
  deprecated: true
1388
1537
  },
1538
+ alt: {},
1389
1539
  border: {
1390
1540
  deprecated: true
1391
1541
  },
@@ -1402,8 +1552,12 @@ var html5 = {
1402
1552
  decoding: {
1403
1553
  enum: ["sync", "async", "auto"]
1404
1554
  },
1555
+ fetchpriority: {
1556
+ omit: true,
1557
+ enum: ["high", "low", "auto"]
1558
+ },
1405
1559
  height: {
1406
- enum: ["/\\d+/"]
1560
+ enum: [validPositiveInteger]
1407
1561
  },
1408
1562
  hspace: {
1409
1563
  deprecated: true
@@ -1411,6 +1565,10 @@ var html5 = {
1411
1565
  ismap: {
1412
1566
  boolean: true
1413
1567
  },
1568
+ loading: {
1569
+ omit: true,
1570
+ enum: ["lazy", "eager"]
1571
+ },
1414
1572
  lowsrc: {
1415
1573
  deprecated: true
1416
1574
  },
@@ -1420,18 +1578,20 @@ var html5 = {
1420
1578
  referrerpolicy: {
1421
1579
  enum: ReferrerPolicy
1422
1580
  },
1581
+ sizes: {},
1423
1582
  src: {
1424
1583
  required: true,
1425
- enum: ["/.+/"]
1584
+ enum: [validNonEmptyString]
1426
1585
  },
1427
1586
  srcset: {
1428
1587
  enum: ["/[^]+/"]
1429
1588
  },
1589
+ usemap: {},
1430
1590
  vspace: {
1431
1591
  deprecated: true
1432
1592
  },
1433
1593
  width: {
1434
- enum: ["/\\d+/"]
1594
+ enum: [validPositiveInteger]
1435
1595
  }
1436
1596
  },
1437
1597
  aria: {
@@ -1459,6 +1619,7 @@ var html5 = {
1459
1619
  }
1460
1620
  }
1461
1621
  },
1622
+ /* https://html.spec.whatwg.org/multipage/input.html#the-input-element */
1462
1623
  input: {
1463
1624
  flow: true,
1464
1625
  focusable(node) {
@@ -1549,10 +1710,10 @@ var html5 = {
1549
1710
  allowed: allowedIfAttributeHasValue("type", ["submit", "image"], {
1550
1711
  defaultValue: "submit"
1551
1712
  }),
1552
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
1713
+ enum: [validBrowsingContextName, "_blank", "_self", "_parent", "_top"]
1553
1714
  },
1554
1715
  height: {
1555
- enum: ["/\\d+/"]
1716
+ enum: [validPositiveInteger]
1556
1717
  },
1557
1718
  hspace: {
1558
1719
  deprecated: true
@@ -1568,22 +1729,22 @@ var html5 = {
1568
1729
  reference: "id"
1569
1730
  },
1570
1731
  max: {
1571
- enum: ["/.+/"]
1732
+ enum: [validNonEmptyString]
1572
1733
  },
1573
1734
  maxlength: {
1574
- enum: ["/\\d+/"]
1735
+ enum: [validPositiveInteger]
1575
1736
  },
1576
1737
  min: {
1577
- enum: ["/.+/"]
1738
+ enum: [validNonEmptyString]
1578
1739
  },
1579
1740
  minlength: {
1580
- enum: ["/\\d+/"]
1741
+ enum: [validPositiveInteger]
1581
1742
  },
1582
1743
  multiple: {
1583
1744
  boolean: true
1584
1745
  },
1585
1746
  name: {
1586
- enum: ["/.+/"]
1747
+ enum: [validNonEmptyString]
1587
1748
  },
1588
1749
  pattern: {},
1589
1750
  placeholder: {},
@@ -1601,10 +1762,10 @@ var html5 = {
1601
1762
  boolean: true
1602
1763
  },
1603
1764
  size: {
1604
- enum: ["/\\d+/"]
1765
+ enum: [validPositiveInteger]
1605
1766
  },
1606
1767
  src: {
1607
- enum: ["/.+/"]
1768
+ enum: [validNonEmptyString]
1608
1769
  },
1609
1770
  step: {},
1610
1771
  type: {
@@ -1641,7 +1802,7 @@ var html5 = {
1641
1802
  deprecated: true
1642
1803
  },
1643
1804
  width: {
1644
- enum: ["/\\d+/"]
1805
+ enum: [validPositiveInteger]
1645
1806
  }
1646
1807
  },
1647
1808
  aria: {
@@ -1706,20 +1867,27 @@ var html5 = {
1706
1867
  }
1707
1868
  }
1708
1869
  },
1870
+ /* https://html.spec.whatwg.org/multipage/edits.html#the-ins-element */
1709
1871
  ins: {
1710
1872
  flow: true,
1711
1873
  phrasing: true,
1712
1874
  transparent: true,
1875
+ attributes: {
1876
+ cite: {},
1877
+ datetime: {}
1878
+ },
1713
1879
  aria: {
1714
1880
  implicitRole: "insertion",
1715
1881
  naming: "prohibited"
1716
1882
  }
1717
1883
  },
1884
+ /* https://html.spec.whatwg.org/multipage/obsolete.html#isindex */
1718
1885
  isindex: {
1719
1886
  deprecated: {
1720
1887
  source: "html4"
1721
1888
  }
1722
1889
  },
1890
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-kbd-element */
1723
1891
  kbd: {
1724
1892
  flow: true,
1725
1893
  phrasing: true,
@@ -1736,6 +1904,7 @@ var html5 = {
1736
1904
  labelable: true,
1737
1905
  deprecated: true
1738
1906
  },
1907
+ /* https://html.spec.whatwg.org/multipage/forms.html#the-label-element */
1739
1908
  label: {
1740
1909
  flow: true,
1741
1910
  phrasing: true,
@@ -1761,6 +1930,7 @@ var html5 = {
1761
1930
  naming: "prohibited"
1762
1931
  }
1763
1932
  },
1933
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-legend-element */
1764
1934
  legend: {
1765
1935
  permittedContent: ["@phrasing", "@heading"],
1766
1936
  attributes: {
@@ -1781,6 +1951,7 @@ var html5 = {
1781
1951
  naming: "prohibited"
1782
1952
  }
1783
1953
  },
1954
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-li-element */
1784
1955
  li: {
1785
1956
  implicitClosed: ["li"],
1786
1957
  permittedContent: ["@flow"],
@@ -1788,6 +1959,9 @@ var html5 = {
1788
1959
  attributes: {
1789
1960
  type: {
1790
1961
  deprecated: true
1962
+ },
1963
+ value: {
1964
+ enum: ["/-?\\d+/"]
1791
1965
  }
1792
1966
  },
1793
1967
  aria: {
@@ -1796,6 +1970,7 @@ var html5 = {
1796
1970
  }
1797
1971
  }
1798
1972
  },
1973
+ /* https://html.spec.whatwg.org/multipage/document-metadata.html#the-link-element */
1799
1974
  link: {
1800
1975
  metadata: true,
1801
1976
  flow(node) {
@@ -1856,7 +2031,7 @@ var html5 = {
1856
2031
  }
1857
2032
  return `{{ tagName }} is missing required "href" or "imagesrcset" attribute`;
1858
2033
  },
1859
- enum: ["/.+/"]
2034
+ enum: [validNonEmptyString]
1860
2035
  },
1861
2036
  imagesrcset: {
1862
2037
  allowed(node) {
@@ -1893,7 +2068,7 @@ var html5 = {
1893
2068
  },
1894
2069
  integrity: {
1895
2070
  allowed: allowedIfAttributeHasValue("rel", ["stylesheet", "preload", "modulepreload"]),
1896
- enum: ["/.+/"]
2071
+ enum: [validNonEmptyString]
1897
2072
  },
1898
2073
  methods: {
1899
2074
  deprecated: true
@@ -1930,7 +2105,7 @@ var html5 = {
1930
2105
  return null;
1931
2106
  },
1932
2107
  list: true,
1933
- enum: ["/.+/"]
2108
+ enum: [validNonEmptyString]
1934
2109
  },
1935
2110
  target: {
1936
2111
  deprecated: true
@@ -1948,12 +2123,14 @@ var html5 = {
1948
2123
  source: "html32"
1949
2124
  }
1950
2125
  },
2126
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-main-element */
1951
2127
  main: {
1952
2128
  flow: true,
1953
2129
  aria: {
1954
2130
  implicitRole: "main"
1955
2131
  }
1956
2132
  },
2133
+ /* https://html.spec.whatwg.org/multipage/image-maps.html#the-map-element */
1957
2134
  map: {
1958
2135
  flow: true,
1959
2136
  phrasing: true,
@@ -1968,6 +2145,7 @@ var html5 = {
1968
2145
  naming: "prohibited"
1969
2146
  }
1970
2147
  },
2148
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-mark-element */
1971
2149
  mark: {
1972
2150
  flow: true,
1973
2151
  phrasing: true,
@@ -1993,6 +2171,7 @@ var html5 = {
1993
2171
  }
1994
2172
  }
1995
2173
  },
2174
+ /* https://html.spec.whatwg.org/multipage/embedded-content.html#mathml */
1996
2175
  math: {
1997
2176
  flow: true,
1998
2177
  foreign: true,
@@ -2025,6 +2204,7 @@ var html5 = {
2025
2204
  implicitRole: "math"
2026
2205
  }
2027
2206
  },
2207
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-menu-element */
2028
2208
  menu: {
2029
2209
  flow: true,
2030
2210
  aria: {
@@ -2032,6 +2212,7 @@ var html5 = {
2032
2212
  },
2033
2213
  permittedContent: ["@script", "li"]
2034
2214
  },
2215
+ /* https://html.spec.whatwg.org/multipage/semantics.html#the-meta-element */
2035
2216
  meta: {
2036
2217
  flow(node) {
2037
2218
  return node.hasAttribute("itemprop");
@@ -2065,10 +2246,31 @@ var html5 = {
2065
2246
  naming: "prohibited"
2066
2247
  }
2067
2248
  },
2249
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-meter-element */
2068
2250
  meter: {
2069
2251
  flow: true,
2070
2252
  phrasing: true,
2071
2253
  labelable: true,
2254
+ attributes: {
2255
+ high: {
2256
+ enum: [validFloatingPoint]
2257
+ },
2258
+ low: {
2259
+ enum: [validFloatingPoint]
2260
+ },
2261
+ max: {
2262
+ enum: [validFloatingPoint]
2263
+ },
2264
+ min: {
2265
+ enum: [validFloatingPoint]
2266
+ },
2267
+ optimum: {
2268
+ enum: [validFloatingPoint]
2269
+ },
2270
+ value: {
2271
+ enum: [validFloatingPoint]
2272
+ }
2273
+ },
2072
2274
  aria: {
2073
2275
  implicitRole: "meter"
2074
2276
  },
@@ -2082,6 +2284,7 @@ var html5 = {
2082
2284
  source: "html5"
2083
2285
  }
2084
2286
  },
2287
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-nav-element */
2085
2288
  nav: {
2086
2289
  flow: true,
2087
2290
  sectioning: true,
@@ -2113,6 +2316,7 @@ var html5 = {
2113
2316
  source: "html5"
2114
2317
  }
2115
2318
  },
2319
+ /* https://html.spec.whatwg.org/multipage/scripting.html#the-noscript-element */
2116
2320
  noscript: {
2117
2321
  metadata: true,
2118
2322
  flow: true,
@@ -2123,6 +2327,7 @@ var html5 = {
2123
2327
  naming: "prohibited"
2124
2328
  }
2125
2329
  },
2330
+ /* https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element */
2126
2331
  object: {
2127
2332
  flow: true,
2128
2333
  phrasing: true,
@@ -2162,7 +2367,7 @@ var html5 = {
2162
2367
  deprecated: true
2163
2368
  },
2164
2369
  data: {
2165
- enum: ["/.+/"],
2370
+ enum: [validNonEmptyString],
2166
2371
  required: true
2167
2372
  },
2168
2373
  datafld: {
@@ -2178,13 +2383,13 @@ var html5 = {
2178
2383
  deprecated: true
2179
2384
  },
2180
2385
  height: {
2181
- enum: ["/\\d+/"]
2386
+ enum: [validPositiveInteger]
2182
2387
  },
2183
2388
  hspace: {
2184
2389
  deprecated: true
2185
2390
  },
2186
2391
  name: {
2187
- enum: ["/[^_].*/"]
2392
+ enum: [validBrowsingContextName]
2188
2393
  },
2189
2394
  standby: {
2190
2395
  deprecated: true
@@ -2193,12 +2398,13 @@ var html5 = {
2193
2398
  deprecated: true
2194
2399
  },
2195
2400
  width: {
2196
- enum: ["/\\d+/"]
2401
+ enum: [validPositiveInteger]
2197
2402
  }
2198
2403
  },
2199
2404
  permittedContent: ["param", "@flow"],
2200
2405
  permittedOrder: ["param", "@flow"]
2201
2406
  },
2407
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-ol-element */
2202
2408
  ol: {
2203
2409
  flow: true,
2204
2410
  attributes: {
@@ -2208,6 +2414,9 @@ var html5 = {
2208
2414
  reversed: {
2209
2415
  boolean: true
2210
2416
  },
2417
+ start: {
2418
+ enum: [validPositiveInteger]
2419
+ },
2211
2420
  type: {
2212
2421
  enum: ["a", "A", "i", "I", "1"]
2213
2422
  }
@@ -2217,18 +2426,21 @@ var html5 = {
2217
2426
  },
2218
2427
  permittedContent: ["@script", "li"]
2219
2428
  },
2429
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-optgroup-element */
2220
2430
  optgroup: {
2221
2431
  implicitClosed: ["optgroup"],
2222
2432
  attributes: {
2223
2433
  disabled: {
2224
2434
  boolean: true
2225
- }
2435
+ },
2436
+ label: {}
2226
2437
  },
2227
2438
  aria: {
2228
2439
  implicitRole: "group"
2229
2440
  },
2230
2441
  permittedContent: ["@script", "option"]
2231
2442
  },
2443
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-option-element */
2232
2444
  option: {
2233
2445
  implicitClosed: ["option"],
2234
2446
  attributes: {
@@ -2241,6 +2453,7 @@ var html5 = {
2241
2453
  disabled: {
2242
2454
  boolean: true
2243
2455
  },
2456
+ label: {},
2244
2457
  name: {
2245
2458
  deprecated: true
2246
2459
  },
@@ -2255,6 +2468,7 @@ var html5 = {
2255
2468
  permittedContent: ["@phrasing", "div"],
2256
2469
  permittedDescendants: [{ exclude: ["@interactive", "datalist", "object"] }]
2257
2470
  },
2471
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-output-element */
2258
2472
  output: {
2259
2473
  flow: true,
2260
2474
  phrasing: true,
@@ -2263,11 +2477,26 @@ var html5 = {
2263
2477
  listed: true
2264
2478
  },
2265
2479
  labelable: true,
2480
+ attributes: {
2481
+ for: {
2482
+ list: true,
2483
+ enum: [validId],
2484
+ reference: "id"
2485
+ },
2486
+ form: {
2487
+ enum: [validId],
2488
+ reference: "id"
2489
+ },
2490
+ name: {
2491
+ enum: [validNonEmptyString]
2492
+ }
2493
+ },
2266
2494
  aria: {
2267
2495
  implicitRole: "status"
2268
2496
  },
2269
2497
  permittedContent: ["@phrasing"]
2270
2498
  },
2499
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-p-element */
2271
2500
  p: {
2272
2501
  flow: true,
2273
2502
  implicitClosed: [
@@ -2335,6 +2564,7 @@ var html5 = {
2335
2564
  naming: "prohibited"
2336
2565
  }
2337
2566
  },
2567
+ /* https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element */
2338
2568
  picture: {
2339
2569
  flow: true,
2340
2570
  phrasing: true,
@@ -2352,6 +2582,7 @@ var html5 = {
2352
2582
  source: "html2"
2353
2583
  }
2354
2584
  },
2585
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element */
2355
2586
  pre: {
2356
2587
  flow: true,
2357
2588
  permittedContent: ["@phrasing"],
@@ -2365,19 +2596,32 @@ var html5 = {
2365
2596
  naming: "prohibited"
2366
2597
  }
2367
2598
  },
2599
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-progress-element */
2368
2600
  progress: {
2369
2601
  flow: true,
2370
2602
  phrasing: true,
2371
2603
  labelable: true,
2604
+ attributes: {
2605
+ max: {
2606
+ enum: [validFloatingPoint]
2607
+ },
2608
+ value: {
2609
+ enum: [validFloatingPoint]
2610
+ }
2611
+ },
2372
2612
  aria: {
2373
2613
  implicitRole: "progressbar"
2374
2614
  },
2375
2615
  permittedContent: ["@phrasing"],
2376
2616
  permittedDescendants: [{ exclude: "progress" }]
2377
2617
  },
2618
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-q-element */
2378
2619
  q: {
2379
2620
  flow: true,
2380
2621
  phrasing: true,
2622
+ attributes: {
2623
+ cite: {}
2624
+ },
2381
2625
  permittedContent: ["@phrasing"],
2382
2626
  aria: {
2383
2627
  implicitRole: "generic",
@@ -2388,6 +2632,7 @@ var html5 = {
2388
2632
  implicitClosed: ["rb", "rt", "rtc", "rp"],
2389
2633
  permittedContent: ["@phrasing"]
2390
2634
  },
2635
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-rp-element */
2391
2636
  rp: {
2392
2637
  implicitClosed: ["rb", "rt", "rtc", "rp"],
2393
2638
  permittedContent: ["@phrasing"],
@@ -2395,6 +2640,7 @@ var html5 = {
2395
2640
  naming: "prohibited"
2396
2641
  }
2397
2642
  },
2643
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-rt-element */
2398
2644
  rt: {
2399
2645
  implicitClosed: ["rb", "rt", "rtc", "rp"],
2400
2646
  permittedContent: ["@phrasing"],
@@ -2406,11 +2652,13 @@ var html5 = {
2406
2652
  implicitClosed: ["rb", "rtc", "rp"],
2407
2653
  permittedContent: ["@phrasing", "rt"]
2408
2654
  },
2655
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-ruby-element */
2409
2656
  ruby: {
2410
2657
  flow: true,
2411
2658
  phrasing: true,
2412
2659
  permittedContent: ["@phrasing", "rb", "rp", "rt", "rtc"]
2413
2660
  },
2661
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-s-element */
2414
2662
  s: {
2415
2663
  flow: true,
2416
2664
  phrasing: true,
@@ -2420,6 +2668,7 @@ var html5 = {
2420
2668
  naming: "prohibited"
2421
2669
  }
2422
2670
  },
2671
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-samp-element */
2423
2672
  samp: {
2424
2673
  flow: true,
2425
2674
  phrasing: true,
@@ -2429,6 +2678,7 @@ var html5 = {
2429
2678
  naming: "prohibited"
2430
2679
  }
2431
2680
  },
2681
+ /* https://html.spec.whatwg.org/multipage/scripting.html#the-script-element */
2432
2682
  script: {
2433
2683
  metadata: true,
2434
2684
  flow: true,
@@ -2460,7 +2710,7 @@ var html5 = {
2460
2710
  },
2461
2711
  integrity: {
2462
2712
  allowed: allowedIfAttributeIsPresent("src"),
2463
- enum: ["/.+/"]
2713
+ enum: [validNonEmptyString]
2464
2714
  },
2465
2715
  language: {
2466
2716
  deprecated: true
@@ -2472,7 +2722,7 @@ var html5 = {
2472
2722
  enum: ReferrerPolicy
2473
2723
  },
2474
2724
  src: {
2475
- enum: ["/.+/"]
2725
+ enum: [validNonEmptyString]
2476
2726
  },
2477
2727
  type: {}
2478
2728
  },
@@ -2480,12 +2730,14 @@ var html5 = {
2480
2730
  naming: "prohibited"
2481
2731
  }
2482
2732
  },
2733
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-search-element */
2483
2734
  search: {
2484
2735
  flow: true,
2485
2736
  aria: {
2486
2737
  implicitRole: "search"
2487
2738
  }
2488
2739
  },
2740
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-section-element */
2489
2741
  section: {
2490
2742
  flow: true,
2491
2743
  sectioning: true,
@@ -2497,6 +2749,7 @@ var html5 = {
2497
2749
  },
2498
2750
  permittedContent: ["@flow"]
2499
2751
  },
2752
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element */
2500
2753
  select: {
2501
2754
  flow: true,
2502
2755
  focusable: true,
@@ -2508,20 +2761,28 @@ var html5 = {
2508
2761
  },
2509
2762
  labelable: true,
2510
2763
  attributes: {
2764
+ autocomplete: {},
2511
2765
  autofocus: {
2512
2766
  boolean: true
2513
2767
  },
2514
2768
  disabled: {
2515
2769
  boolean: true
2516
2770
  },
2771
+ form: {
2772
+ enum: [validId],
2773
+ reference: "id"
2774
+ },
2517
2775
  multiple: {
2518
2776
  boolean: true
2519
2777
  },
2778
+ name: {
2779
+ enum: [validNonEmptyString]
2780
+ },
2520
2781
  required: {
2521
2782
  boolean: true
2522
2783
  },
2523
2784
  size: {
2524
- enum: ["/\\d+/"]
2785
+ enum: [validPositiveInteger]
2525
2786
  }
2526
2787
  },
2527
2788
  aria: {
@@ -2560,6 +2821,7 @@ var html5 = {
2560
2821
  ],
2561
2822
  permittedOrder: ["button", "option, optgroup, hr"]
2562
2823
  },
2824
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-selectedcontent-element */
2563
2825
  selectedcontent: {
2564
2826
  phrasing: true,
2565
2827
  permittedContent: [],
@@ -2570,6 +2832,7 @@ var html5 = {
2570
2832
  naming: "prohibited"
2571
2833
  }
2572
2834
  },
2835
+ /* https://html.spec.whatwg.org/multipage/scripting.html#the-slot-element */
2573
2836
  slot: {
2574
2837
  flow: true,
2575
2838
  phrasing: true,
@@ -2581,6 +2844,7 @@ var html5 = {
2581
2844
  name: {}
2582
2845
  }
2583
2846
  },
2847
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-small-element */
2584
2848
  small: {
2585
2849
  flow: true,
2586
2850
  phrasing: true,
@@ -2590,6 +2854,7 @@ var html5 = {
2590
2854
  naming: "prohibited"
2591
2855
  }
2592
2856
  },
2857
+ /* https://html.spec.whatwg.org/multipage/embedded-content.html#the-source-element */
2593
2858
  source: {
2594
2859
  void: true,
2595
2860
  attributes: {
@@ -2606,11 +2871,11 @@ var html5 = {
2606
2871
  },
2607
2872
  width: {
2608
2873
  allowed: allowedIfParentIsPresent("picture"),
2609
- enum: ["/\\d+/"]
2874
+ enum: [validPositiveInteger]
2610
2875
  },
2611
2876
  height: {
2612
2877
  allowed: allowedIfParentIsPresent("picture"),
2613
- enum: ["/\\d+/"]
2878
+ enum: [validPositiveInteger]
2614
2879
  }
2615
2880
  },
2616
2881
  aria: {
@@ -2624,6 +2889,7 @@ var html5 = {
2624
2889
  source: "non-standard"
2625
2890
  }
2626
2891
  },
2892
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-span-element */
2627
2893
  span: {
2628
2894
  flow: true,
2629
2895
  phrasing: true,
@@ -2651,6 +2917,7 @@ var html5 = {
2651
2917
  source: "html5"
2652
2918
  }
2653
2919
  },
2920
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-strong-element */
2654
2921
  strong: {
2655
2922
  flow: true,
2656
2923
  phrasing: true,
@@ -2660,12 +2927,14 @@ var html5 = {
2660
2927
  naming: "prohibited"
2661
2928
  }
2662
2929
  },
2930
+ /* https://html.spec.whatwg.org/multipage/semantics.html#the-style-element */
2663
2931
  style: {
2664
2932
  metadata: true,
2665
2933
  aria: {
2666
2934
  naming: "prohibited"
2667
2935
  }
2668
2936
  },
2937
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-sub-and-sup-elements */
2669
2938
  sub: {
2670
2939
  flow: true,
2671
2940
  phrasing: true,
@@ -2675,6 +2944,7 @@ var html5 = {
2675
2944
  naming: "prohibited"
2676
2945
  }
2677
2946
  },
2947
+ /* https://html.spec.whatwg.org/multipage/interactive-elements.html#the-summary-element */
2678
2948
  summary: {
2679
2949
  permittedContent: ["@phrasing", "@heading"],
2680
2950
  focusable(node) {
@@ -2684,6 +2954,7 @@ var html5 = {
2684
2954
  implicitRole: "button"
2685
2955
  }
2686
2956
  },
2957
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-sub-and-sup-elements */
2687
2958
  sup: {
2688
2959
  flow: true,
2689
2960
  phrasing: true,
@@ -2693,6 +2964,7 @@ var html5 = {
2693
2964
  naming: "prohibited"
2694
2965
  }
2695
2966
  },
2967
+ /* https://html.spec.whatwg.org/multipage/embedded-content.html#svg-0 */
2696
2968
  svg: {
2697
2969
  flow: true,
2698
2970
  foreign: true,
@@ -2712,6 +2984,7 @@ var html5 = {
2712
2984
  * "no-unknown-elements" they are added here */
2713
2985
  "svg:desc": {},
2714
2986
  "svg:title": {},
2987
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-table-element */
2715
2988
  table: {
2716
2989
  flow: true,
2717
2990
  permittedContent: ["@script", "caption?", "colgroup", "tbody", "tfoot?", "thead?", "tr"],
@@ -2761,6 +3034,7 @@ var html5 = {
2761
3034
  implicitRole: "table"
2762
3035
  }
2763
3036
  },
3037
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-tbody-element */
2764
3038
  tbody: {
2765
3039
  implicitClosed: ["tbody", "tfoot"],
2766
3040
  permittedContent: ["@script", "tr"],
@@ -2785,6 +3059,7 @@ var html5 = {
2785
3059
  implicitRole: "rowgroup"
2786
3060
  }
2787
3061
  },
3062
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-td-element */
2788
3063
  td: {
2789
3064
  flow: true,
2790
3065
  implicitClosed: ["td", "th", "tr", "tbody", "tfoot"],
@@ -2808,7 +3083,12 @@ var html5 = {
2808
3083
  deprecated: true
2809
3084
  },
2810
3085
  colspan: {
2811
- enum: ["/\\d+/"]
3086
+ enum: [validPositiveInteger]
3087
+ },
3088
+ headers: {
3089
+ list: true,
3090
+ enum: [validId],
3091
+ reference: "id"
2812
3092
  },
2813
3093
  height: {
2814
3094
  deprecated: true
@@ -2817,7 +3097,7 @@ var html5 = {
2817
3097
  deprecated: true
2818
3098
  },
2819
3099
  rowspan: {
2820
- enum: ["/\\d+/"]
3100
+ enum: [validPositiveInteger]
2821
3101
  },
2822
3102
  scope: {
2823
3103
  deprecated: true
@@ -2846,16 +3126,38 @@ var html5 = {
2846
3126
  },
2847
3127
  permittedContent: ["@flow"]
2848
3128
  },
3129
+ /* https://html.spec.whatwg.org/multipage/scripting.html#the-template-element */
2849
3130
  template: {
2850
3131
  metadata: true,
2851
3132
  flow: true,
2852
3133
  phrasing: true,
2853
3134
  scriptSupporting: true,
2854
3135
  templateRoot: true,
3136
+ attributes: {
3137
+ shadowrootclonable: {
3138
+ boolean: true
3139
+ },
3140
+ shadowrootcustomelementregistry: {
3141
+ boolean: true
3142
+ },
3143
+ shadowrootdelegatesfocus: {
3144
+ boolean: true
3145
+ },
3146
+ shadowrootmode: {
3147
+ enum: ["open", "closed"]
3148
+ },
3149
+ shadowrootserializable: {
3150
+ boolean: true
3151
+ },
3152
+ shadowrootslotassignment: {
3153
+ enum: ["named", "manual"]
3154
+ }
3155
+ },
2855
3156
  aria: {
2856
3157
  naming: "prohibited"
2857
3158
  }
2858
3159
  },
3160
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element */
2859
3161
  textarea: {
2860
3162
  flow: true,
2861
3163
  focusable: true,
@@ -2872,7 +3174,7 @@ var html5 = {
2872
3174
  boolean: true
2873
3175
  },
2874
3176
  cols: {
2875
- enum: ["/\\d+/"]
3177
+ enum: [validPositiveInteger]
2876
3178
  },
2877
3179
  datafld: {
2878
3180
  deprecated: true
@@ -2880,15 +3182,26 @@ var html5 = {
2880
3182
  datasrc: {
2881
3183
  deprecated: true
2882
3184
  },
3185
+ dirname: {
3186
+ enum: [validNonEmptyString]
3187
+ },
2883
3188
  disabled: {
2884
3189
  boolean: true
2885
3190
  },
3191
+ form: {
3192
+ enum: [validId],
3193
+ reference: "id"
3194
+ },
2886
3195
  maxlength: {
2887
- enum: ["/\\d+/"]
3196
+ enum: [validPositiveInteger]
2888
3197
  },
2889
3198
  minlength: {
2890
- enum: ["/\\d+/"]
3199
+ enum: [validPositiveInteger]
2891
3200
  },
3201
+ name: {
3202
+ enum: [validNonEmptyString]
3203
+ },
3204
+ placeholder: {},
2892
3205
  readonly: {
2893
3206
  boolean: true
2894
3207
  },
@@ -2896,7 +3209,7 @@ var html5 = {
2896
3209
  boolean: true
2897
3210
  },
2898
3211
  rows: {
2899
- enum: ["/\\d+/"]
3212
+ enum: [validPositiveInteger]
2900
3213
  },
2901
3214
  wrap: {
2902
3215
  enum: ["hard", "soft"]
@@ -2907,6 +3220,7 @@ var html5 = {
2907
3220
  },
2908
3221
  permittedContent: []
2909
3222
  },
3223
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-tfoot-element */
2910
3224
  tfoot: {
2911
3225
  implicitClosed: ["tbody"],
2912
3226
  optionalEnd: true,
@@ -2932,10 +3246,12 @@ var html5 = {
2932
3246
  implicitRole: "rowgroup"
2933
3247
  }
2934
3248
  },
3249
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-th-element */
2935
3250
  th: {
2936
3251
  flow: true,
2937
3252
  implicitClosed: ["td", "th", "tr", "tbody", "tfoot"],
2938
3253
  attributes: {
3254
+ abbr: {},
2939
3255
  align: {
2940
3256
  deprecated: true
2941
3257
  },
@@ -2951,11 +3267,16 @@ var html5 = {
2951
3267
  char: {
2952
3268
  deprecated: true
2953
3269
  },
3270
+ headers: {
3271
+ list: true,
3272
+ enum: [validId],
3273
+ reference: "id"
3274
+ },
2954
3275
  charoff: {
2955
3276
  deprecated: true
2956
3277
  },
2957
3278
  colspan: {
2958
- enum: ["/\\d+/"]
3279
+ enum: [validPositiveInteger]
2959
3280
  },
2960
3281
  height: {
2961
3282
  deprecated: true
@@ -2964,7 +3285,7 @@ var html5 = {
2964
3285
  deprecated: true
2965
3286
  },
2966
3287
  rowspan: {
2967
- enum: ["/\\d+/"]
3288
+ enum: [validPositiveInteger]
2968
3289
  },
2969
3290
  scope: {
2970
3291
  enum: ["row", "col", "rowgroup", "colgroup"]
@@ -2997,6 +3318,7 @@ var html5 = {
2997
3318
  permittedContent: ["@flow"],
2998
3319
  permittedDescendants: [{ exclude: ["header", "footer", "@sectioning", "@heading"] }]
2999
3320
  },
3321
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-thead-element */
3000
3322
  thead: {
3001
3323
  implicitClosed: ["tbody", "tfoot"],
3002
3324
  optionalEnd: true,
@@ -3022,15 +3344,20 @@ var html5 = {
3022
3344
  implicitRole: "rowgroup"
3023
3345
  }
3024
3346
  },
3347
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-time-element */
3025
3348
  time: {
3026
3349
  flow: true,
3027
3350
  phrasing: true,
3351
+ attributes: {
3352
+ datetime: {}
3353
+ },
3028
3354
  aria: {
3029
3355
  implicitRole: "time",
3030
3356
  naming: "prohibited"
3031
3357
  },
3032
3358
  permittedContent: ["@phrasing"]
3033
3359
  },
3360
+ /* https://html.spec.whatwg.org/multipage/document-metadata.html#the-title-element */
3034
3361
  title: {
3035
3362
  metadata: true,
3036
3363
  permittedContent: [],
@@ -3039,6 +3366,7 @@ var html5 = {
3039
3366
  naming: "prohibited"
3040
3367
  }
3041
3368
  },
3369
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-tr-element */
3042
3370
  tr: {
3043
3371
  implicitClosed: ["tr", "tbody", "tfoot"],
3044
3372
  permittedContent: ["@script", "td", "th"],
@@ -3066,8 +3394,24 @@ var html5 = {
3066
3394
  implicitRole: "row"
3067
3395
  }
3068
3396
  },
3397
+ /* https://html.spec.whatwg.org/multipage/media.html#the-track-element */
3069
3398
  track: {
3070
3399
  void: true,
3400
+ attributes: {
3401
+ default: {
3402
+ boolean: true
3403
+ },
3404
+ kind: {
3405
+ omit: true,
3406
+ enum: ["subtitles", "captions", "descriptions", "chapters", "metadata"]
3407
+ },
3408
+ label: {},
3409
+ src: {
3410
+ required: true,
3411
+ enum: [validNonEmptyString]
3412
+ },
3413
+ srclang: {}
3414
+ },
3071
3415
  aria: {
3072
3416
  naming: "prohibited"
3073
3417
  }
@@ -3078,6 +3422,7 @@ var html5 = {
3078
3422
  source: "html4"
3079
3423
  }
3080
3424
  },
3425
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-u-element */
3081
3426
  u: {
3082
3427
  flow: true,
3083
3428
  phrasing: true,
@@ -3087,6 +3432,7 @@ var html5 = {
3087
3432
  naming: "prohibited"
3088
3433
  }
3089
3434
  },
3435
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-ul-element */
3090
3436
  ul: {
3091
3437
  flow: true,
3092
3438
  permittedContent: ["@script", "li"],
@@ -3102,6 +3448,7 @@ var html5 = {
3102
3448
  implicitRole: "list"
3103
3449
  }
3104
3450
  },
3451
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-var-element */
3105
3452
  var: {
3106
3453
  flow: true,
3107
3454
  phrasing: true,
@@ -3110,6 +3457,7 @@ var html5 = {
3110
3457
  naming: "prohibited"
3111
3458
  }
3112
3459
  },
3460
+ /* https://html.spec.whatwg.org/multipage/media.html#the-video-element */
3113
3461
  video: {
3114
3462
  flow: true,
3115
3463
  focusable(node) {
@@ -3122,28 +3470,50 @@ var html5 = {
3122
3470
  },
3123
3471
  transparent: ["@flow"],
3124
3472
  attributes: {
3473
+ autoplay: {
3474
+ boolean: true
3475
+ },
3476
+ controls: {
3477
+ boolean: true
3478
+ },
3125
3479
  crossorigin: {
3126
3480
  omit: true,
3127
3481
  enum: ["anonymous", "use-credentials"]
3128
3482
  },
3129
3483
  height: {
3130
- enum: ["/\\d+/"]
3484
+ enum: [validPositiveInteger]
3131
3485
  },
3132
3486
  itemprop: {
3133
3487
  allowed: allowedIfAttributeIsPresent("src")
3134
3488
  },
3489
+ loop: {
3490
+ boolean: true
3491
+ },
3492
+ muted: {
3493
+ boolean: true
3494
+ },
3495
+ playsinline: {
3496
+ boolean: true
3497
+ },
3498
+ poster: {
3499
+ enum: [validNonEmptyString]
3500
+ },
3135
3501
  preload: {
3136
3502
  omit: true,
3137
3503
  enum: ["none", "metadata", "auto"]
3138
3504
  },
3505
+ src: {
3506
+ enum: [validNonEmptyString]
3507
+ },
3139
3508
  width: {
3140
- enum: ["/\\d+/"]
3509
+ enum: [validPositiveInteger]
3141
3510
  }
3142
3511
  },
3143
3512
  permittedContent: ["@flow", "track", "source"],
3144
3513
  permittedDescendants: [{ exclude: ["audio", "video"] }],
3145
3514
  permittedOrder: ["source", "track", "@flow"]
3146
3515
  },
3516
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-wbr-element */
3147
3517
  wbr: {
3148
3518
  flow: true,
3149
3519
  phrasing: true,
@@ -3152,6 +3522,7 @@ var html5 = {
3152
3522
  naming: "prohibited"
3153
3523
  }
3154
3524
  },
3525
+ /* https://html.spec.whatwg.org/multipage/obsolete.html#the-xmp-element */
3155
3526
  xmp: {
3156
3527
  deprecated: {
3157
3528
  documentation: "Use `<pre>` or `<code>` and escape content using HTML entities instead.",