html-validate 11.3.0 → 11.5.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.
@@ -10,7 +10,26 @@ const {
10
10
  allowedIfParentIsPresent,
11
11
  hasKeyword
12
12
  } = metaHelper.metadataHelper;
13
- const validId = "/\\S+/";
13
+ const validId = {
14
+ name: "a valid id",
15
+ pattern: /^\S+$/
16
+ };
17
+ const validPositiveInteger = {
18
+ name: "a positive integer",
19
+ pattern: /^\d+$/
20
+ };
21
+ const validNonEmptyString = {
22
+ name: "a non-empty string",
23
+ pattern: /^.+$/
24
+ };
25
+ const validBrowsingContextName = {
26
+ name: "a browsing context name (non-empty string, must not start with `_`)",
27
+ pattern: /^[^_].*$/
28
+ };
29
+ const validFloatingPoint = {
30
+ name: "a floating-point number",
31
+ pattern: /^-?(\d+(\.\d+)?|\.\d+)([Ee][+-]?\d+)?$/
32
+ };
14
33
  const ReferrerPolicy = [
15
34
  "",
16
35
  "no-referrer",
@@ -64,12 +83,50 @@ function linkBodyOk(node) {
64
83
  return tokens.some((keyword) => bodyOk.has(keyword));
65
84
  }
66
85
  var html5 = {
86
+ /* https://html.spec.whatwg.org/multipage/dom.html#global-attributes */
67
87
  "*": {
68
88
  attributes: {
69
89
  accesskey: {
70
90
  enum: [/./u],
71
91
  list: true
72
92
  },
93
+ "aria-activedescendant": {
94
+ enum: [validId],
95
+ reference: "id"
96
+ },
97
+ "aria-controls": {
98
+ list: true,
99
+ enum: [validId],
100
+ reference: "id"
101
+ },
102
+ "aria-describedby": {
103
+ list: true,
104
+ enum: [validId],
105
+ reference: "id"
106
+ },
107
+ "aria-details": {
108
+ enum: [validId],
109
+ reference: "id"
110
+ },
111
+ "aria-errormessage": {
112
+ enum: [validId],
113
+ reference: "id"
114
+ },
115
+ "aria-flowto": {
116
+ list: true,
117
+ enum: [validId],
118
+ reference: "id"
119
+ },
120
+ "aria-labelledby": {
121
+ list: true,
122
+ enum: [validId],
123
+ reference: "id"
124
+ },
125
+ "aria-owns": {
126
+ list: true,
127
+ enum: [validId],
128
+ reference: "id"
129
+ },
73
130
  "aria-*": {},
74
131
  autocapitalize: {
75
132
  enum: ["off", "none", "on", "sentences", "words", "characters"]
@@ -163,9 +220,15 @@ var html5 = {
163
220
  enum: ["true", "false"]
164
221
  },
165
222
  "xml:*": {},
166
- "xmlns:*": {}
223
+ xmlns: {
224
+ enum: [validNonEmptyString]
225
+ },
226
+ "xmlns:*": {
227
+ enum: [validNonEmptyString]
228
+ }
167
229
  }
168
230
  },
231
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element */
169
232
  a: {
170
233
  flow: true,
171
234
  focusable(node) {
@@ -192,7 +255,7 @@ var html5 = {
192
255
  download: {
193
256
  allowed: allowedIfAttributeIsPresent("href"),
194
257
  omit: true,
195
- enum: ["/.+/"]
258
+ enum: [validNonEmptyString]
196
259
  },
197
260
  href: {
198
261
  enum: ["/.*/"]
@@ -284,14 +347,14 @@ var html5 = {
284
347
  return null;
285
348
  },
286
349
  list: true,
287
- enum: ["/.+/"]
350
+ enum: [validNonEmptyString]
288
351
  },
289
352
  shape: {
290
353
  deprecated: true
291
354
  },
292
355
  target: {
293
356
  allowed: allowedIfAttributeIsPresent("href"),
294
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
357
+ enum: [validBrowsingContextName, "_blank", "_self", "_parent", "_top"]
295
358
  },
296
359
  type: {
297
360
  allowed: allowedIfAttributeIsPresent("href")
@@ -315,6 +378,7 @@ var html5 = {
315
378
  }
316
379
  }
317
380
  },
381
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-abbr-element */
318
382
  abbr: {
319
383
  flow: true,
320
384
  phrasing: true,
@@ -330,6 +394,7 @@ var html5 = {
330
394
  source: "html5"
331
395
  }
332
396
  },
397
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-address-element */
333
398
  address: {
334
399
  flow: true,
335
400
  aria: {
@@ -338,6 +403,7 @@ var html5 = {
338
403
  permittedContent: ["@flow"],
339
404
  permittedDescendants: [{ exclude: ["address", "header", "footer", "@heading", "@sectioning"] }]
340
405
  },
406
+ /* https://html.spec.whatwg.org/multipage/obsolete.html#the-applet-element */
341
407
  applet: {
342
408
  deprecated: {
343
409
  source: "html5"
@@ -351,6 +417,7 @@ var html5 = {
351
417
  }
352
418
  }
353
419
  },
420
+ /* https://html.spec.whatwg.org/multipage/image-maps.html#the-area-element */
354
421
  area: {
355
422
  flow(node) {
356
423
  return Boolean(node.closest("map"));
@@ -477,7 +544,7 @@ var html5 = {
477
544
  },
478
545
  target: {
479
546
  allowed: allowedIfAttributeIsPresent("href"),
480
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
547
+ enum: [validBrowsingContextName, "_blank", "_self", "_parent", "_top"]
481
548
  }
482
549
  },
483
550
  aria: {
@@ -490,6 +557,7 @@ var html5 = {
490
557
  },
491
558
  requiredAncestors: ["map", "template"]
492
559
  },
560
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-article-element */
493
561
  article: {
494
562
  flow: true,
495
563
  sectioning: true,
@@ -499,6 +567,7 @@ var html5 = {
499
567
  implicitRole: "article"
500
568
  }
501
569
  },
570
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-aside-element */
502
571
  aside: {
503
572
  flow: true,
504
573
  sectioning: true,
@@ -508,6 +577,7 @@ var html5 = {
508
577
  implicitRole: "complementary"
509
578
  }
510
579
  },
580
+ /* https://html.spec.whatwg.org/multipage/media.html#the-audio-element */
511
581
  audio: {
512
582
  flow: true,
513
583
  focusable(node) {
@@ -520,6 +590,12 @@ var html5 = {
520
590
  },
521
591
  transparent: ["@flow"],
522
592
  attributes: {
593
+ autoplay: {
594
+ boolean: true
595
+ },
596
+ controls: {
597
+ boolean: true
598
+ },
523
599
  crossorigin: {
524
600
  omit: true,
525
601
  enum: ["anonymous", "use-credentials"]
@@ -527,15 +603,25 @@ var html5 = {
527
603
  itemprop: {
528
604
  allowed: allowedIfAttributeIsPresent("src")
529
605
  },
606
+ loop: {
607
+ boolean: true
608
+ },
609
+ muted: {
610
+ boolean: true
611
+ },
530
612
  preload: {
531
613
  omit: true,
532
614
  enum: ["none", "metadata", "auto"]
615
+ },
616
+ src: {
617
+ enum: [validNonEmptyString]
533
618
  }
534
619
  },
535
620
  permittedContent: ["@flow", "track", "source"],
536
621
  permittedDescendants: [{ exclude: ["audio", "video"] }],
537
622
  permittedOrder: ["source", "track", "@flow"]
538
623
  },
624
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-b-element */
539
625
  b: {
540
626
  flow: true,
541
627
  phrasing: true,
@@ -545,9 +631,14 @@ var html5 = {
545
631
  naming: "prohibited"
546
632
  }
547
633
  },
634
+ /* https://html.spec.whatwg.org/multipage/document-metadata.html#the-base-element */
548
635
  base: {
549
636
  metadata: true,
550
637
  void: true,
638
+ attributes: {
639
+ href: {},
640
+ target: {}
641
+ },
551
642
  permittedParent: ["head"],
552
643
  aria: {
553
644
  naming: "prohibited"
@@ -560,6 +651,7 @@ var html5 = {
560
651
  source: "html4"
561
652
  }
562
653
  },
654
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-bdi-element */
563
655
  bdi: {
564
656
  flow: true,
565
657
  phrasing: true,
@@ -569,6 +661,7 @@ var html5 = {
569
661
  naming: "prohibited"
570
662
  }
571
663
  },
664
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-bdo-element */
572
665
  bdo: {
573
666
  flow: true,
574
667
  phrasing: true,
@@ -598,14 +691,19 @@ var html5 = {
598
691
  source: "non-standard"
599
692
  }
600
693
  },
694
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-blockquote-element */
601
695
  blockquote: {
602
696
  flow: true,
603
697
  sectioning: true,
698
+ attributes: {
699
+ cite: {}
700
+ },
604
701
  aria: {
605
702
  implicitRole: "blockquote"
606
703
  },
607
704
  permittedContent: ["@flow"]
608
705
  },
706
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-body-element */
609
707
  body: {
610
708
  optionalEnd: true,
611
709
  permittedContent: ["@flow"],
@@ -653,6 +751,7 @@ var html5 = {
653
751
  naming: "prohibited"
654
752
  }
655
753
  },
754
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-br-element */
656
755
  br: {
657
756
  flow: true,
658
757
  phrasing: true,
@@ -666,6 +765,7 @@ var html5 = {
666
765
  naming: "prohibited"
667
766
  }
668
767
  },
768
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element */
669
769
  button: {
670
770
  flow: true,
671
771
  focusable: true,
@@ -684,6 +784,21 @@ var html5 = {
684
784
  autofocus: {
685
785
  boolean: true
686
786
  },
787
+ command: {
788
+ enum: [
789
+ "toggle-popover",
790
+ "show-popover",
791
+ "hide-popover",
792
+ "close",
793
+ "request-close",
794
+ "show-modal",
795
+ "/^--/"
796
+ ]
797
+ },
798
+ commandfor: {
799
+ enum: [validId],
800
+ reference: "id"
801
+ },
687
802
  datafld: {
688
803
  deprecated: true
689
804
  },
@@ -696,6 +811,10 @@ var html5 = {
696
811
  disabled: {
697
812
  boolean: true
698
813
  },
814
+ form: {
815
+ enum: [validId],
816
+ reference: "id"
817
+ },
699
818
  formaction: {
700
819
  allowed: allowedIfAttributeHasValue("type", ["submit"], { defaultValue: "submit" })
701
820
  },
@@ -712,11 +831,22 @@ var html5 = {
712
831
  },
713
832
  formtarget: {
714
833
  allowed: allowedIfAttributeHasValue("type", ["submit"], { defaultValue: "submit" }),
715
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
834
+ enum: [validBrowsingContextName, "_blank", "_self", "_parent", "_top"]
835
+ },
836
+ name: {
837
+ enum: [validNonEmptyString]
838
+ },
839
+ popovertarget: {
840
+ enum: [validId],
841
+ reference: "id"
842
+ },
843
+ popovertargetaction: {
844
+ enum: ["toggle", "show", "hide"]
716
845
  },
717
846
  type: {
718
847
  enum: ["submit", "reset", "button"]
719
- }
848
+ },
849
+ value: {}
720
850
  },
721
851
  aria: {
722
852
  implicitRole: "button"
@@ -725,12 +855,14 @@ var html5 = {
725
855
  permittedDescendants: [{ exclude: ["@interactive"] }],
726
856
  textContent: "accessible"
727
857
  },
858
+ /* https://html.spec.whatwg.org/multipage/canvas.html#the-canvas-element */
728
859
  canvas: {
729
860
  flow: true,
730
861
  phrasing: true,
731
862
  embedded: true,
732
863
  transparent: true
733
864
  },
865
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-caption-element */
734
866
  caption: {
735
867
  implicitClosed: ["colgroup", "thead", "tfoot", "tbody", "tr"],
736
868
  optionalEnd: true,
@@ -753,6 +885,7 @@ var html5 = {
753
885
  source: "html4"
754
886
  }
755
887
  },
888
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-cite-element */
756
889
  cite: {
757
890
  flow: true,
758
891
  phrasing: true,
@@ -761,6 +894,7 @@ var html5 = {
761
894
  naming: "prohibited"
762
895
  }
763
896
  },
897
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-code-element */
764
898
  code: {
765
899
  flow: true,
766
900
  phrasing: true,
@@ -770,6 +904,7 @@ var html5 = {
770
904
  naming: "prohibited"
771
905
  }
772
906
  },
907
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-col-element */
773
908
  col: {
774
909
  attributes: {
775
910
  align: {
@@ -782,7 +917,7 @@ var html5 = {
782
917
  deprecated: true
783
918
  },
784
919
  span: {
785
- enum: ["/\\d+/"]
920
+ enum: [validPositiveInteger]
786
921
  },
787
922
  valign: {
788
923
  deprecated: true
@@ -796,11 +931,12 @@ var html5 = {
796
931
  naming: "prohibited"
797
932
  }
798
933
  },
934
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-colgroup-element */
799
935
  colgroup: {
800
936
  implicitClosed: ["colgroup", "caption", "thead", "tbody", "tfoot", "tr"],
801
937
  attributes: {
802
938
  span: {
803
- enum: ["/\\d+/"]
939
+ enum: [validPositiveInteger]
804
940
  }
805
941
  },
806
942
  permittedContent: ["col", "template"],
@@ -808,15 +944,20 @@ var html5 = {
808
944
  naming: "prohibited"
809
945
  }
810
946
  },
947
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-data-element */
811
948
  data: {
812
949
  flow: true,
813
950
  phrasing: true,
951
+ attributes: {
952
+ value: {}
953
+ },
814
954
  permittedContent: ["@phrasing"],
815
955
  aria: {
816
956
  implicitRole: "generic",
817
957
  naming: "prohibited"
818
958
  }
819
959
  },
960
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-datalist-element */
820
961
  datalist: {
821
962
  flow: true,
822
963
  phrasing: true,
@@ -826,25 +967,33 @@ var html5 = {
826
967
  },
827
968
  permittedContent: ["@phrasing", "option"]
828
969
  },
970
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-dd-element */
829
971
  dd: {
830
972
  implicitClosed: ["dd", "dt"],
831
973
  permittedContent: ["@flow"],
832
974
  requiredAncestors: ["dl > dd", "dl > div > dd", "template > dd", "template > div > dd"]
833
975
  },
976
+ /* https://html.spec.whatwg.org/multipage/edits.html#the-del-element */
834
977
  del: {
835
978
  flow: true,
836
979
  phrasing: true,
837
980
  transparent: true,
981
+ attributes: {
982
+ cite: {},
983
+ datetime: {}
984
+ },
838
985
  aria: {
839
986
  implicitRole: "deletion",
840
987
  naming: "prohibited"
841
988
  }
842
989
  },
990
+ /* https://html.spec.whatwg.org/multipage/interactive-elements.html#the-details-element */
843
991
  details: {
844
992
  flow: true,
845
993
  sectioning: true,
846
994
  interactive: true,
847
995
  attributes: {
996
+ name: {},
848
997
  open: {
849
998
  boolean: true
850
999
  }
@@ -856,6 +1005,7 @@ var html5 = {
856
1005
  permittedOrder: ["summary", "@flow"],
857
1006
  requiredContent: ["summary"]
858
1007
  },
1008
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-dfn-element */
859
1009
  dfn: {
860
1010
  flow: true,
861
1011
  phrasing: true,
@@ -865,10 +1015,15 @@ var html5 = {
865
1015
  permittedContent: ["@phrasing"],
866
1016
  permittedDescendants: [{ exclude: ["dfn"] }]
867
1017
  },
1018
+ /* https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element */
868
1019
  dialog: {
869
1020
  flow: true,
870
1021
  permittedContent: ["@flow"],
871
1022
  attributes: {
1023
+ closedby: {
1024
+ omit: true,
1025
+ enum: ["any", "closerequest", "none"]
1026
+ },
872
1027
  open: {
873
1028
  boolean: true
874
1029
  }
@@ -883,6 +1038,7 @@ var html5 = {
883
1038
  source: "html4"
884
1039
  }
885
1040
  },
1041
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-div-element */
886
1042
  div: {
887
1043
  flow: true,
888
1044
  permittedContent: ["@flow", "dt", "dd"],
@@ -905,6 +1061,7 @@ var html5 = {
905
1061
  naming: "prohibited"
906
1062
  }
907
1063
  },
1064
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element */
908
1065
  dl: {
909
1066
  flow: true,
910
1067
  permittedContent: ["@script", "dt", "dd", "div"],
@@ -914,12 +1071,14 @@ var html5 = {
914
1071
  }
915
1072
  }
916
1073
  },
1074
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-dt-element */
917
1075
  dt: {
918
1076
  implicitClosed: ["dd", "dt"],
919
1077
  permittedContent: ["@flow"],
920
1078
  permittedDescendants: [{ exclude: ["header", "footer", "@sectioning", "@heading"] }],
921
1079
  requiredAncestors: ["dl > dt", "dl > div > dt", "template > dt", "template > div > dt"]
922
1080
  },
1081
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-em-element */
923
1082
  em: {
924
1083
  flow: true,
925
1084
  phrasing: true,
@@ -929,6 +1088,7 @@ var html5 = {
929
1088
  naming: "prohibited"
930
1089
  }
931
1090
  },
1091
+ /* https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-embed-element */
932
1092
  embed: {
933
1093
  flow: true,
934
1094
  phrasing: true,
@@ -937,20 +1097,21 @@ var html5 = {
937
1097
  void: true,
938
1098
  attributes: {
939
1099
  height: {
940
- enum: ["/\\d+/"]
1100
+ enum: [validPositiveInteger]
941
1101
  },
942
1102
  src: {
943
1103
  required: true,
944
- enum: ["/.+/"]
1104
+ enum: [validNonEmptyString]
945
1105
  },
946
1106
  title: {
947
1107
  required: true
948
1108
  },
949
1109
  width: {
950
- enum: ["/\\d+/"]
1110
+ enum: [validPositiveInteger]
951
1111
  }
952
1112
  }
953
1113
  },
1114
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-fieldset-element */
954
1115
  fieldset: {
955
1116
  flow: true,
956
1117
  formAssociated: {
@@ -963,6 +1124,13 @@ var html5 = {
963
1124
  },
964
1125
  disabled: {
965
1126
  boolean: true
1127
+ },
1128
+ form: {
1129
+ enum: [validId],
1130
+ reference: "id"
1131
+ },
1132
+ name: {
1133
+ enum: [validNonEmptyString]
966
1134
  }
967
1135
  },
968
1136
  aria: {
@@ -971,12 +1139,14 @@ var html5 = {
971
1139
  permittedContent: ["@flow", "legend?"],
972
1140
  permittedOrder: ["legend", "@flow"]
973
1141
  },
1142
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-figcaption-element */
974
1143
  figcaption: {
975
1144
  permittedContent: ["@flow"],
976
1145
  aria: {
977
1146
  naming: "prohibited"
978
1147
  }
979
1148
  },
1149
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-figure-element */
980
1150
  figure: {
981
1151
  flow: true,
982
1152
  aria: {
@@ -992,6 +1162,7 @@ var html5 = {
992
1162
  source: "html4"
993
1163
  }
994
1164
  },
1165
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-footer-element */
995
1166
  footer: {
996
1167
  flow: true,
997
1168
  aria: {
@@ -1013,22 +1184,28 @@ var html5 = {
1013
1184
  permittedContent: ["@flow"],
1014
1185
  permittedDescendants: [{ exclude: ["header", "footer", "main"] }]
1015
1186
  },
1187
+ /* https://html.spec.whatwg.org/multipage/forms.html#the-form-element */
1016
1188
  form: {
1017
1189
  flow: true,
1018
1190
  form: true,
1019
1191
  attributes: {
1020
- action: {
1021
- enum: [/^\s*\S+\s*$/]
1022
- },
1023
1192
  accept: {
1024
1193
  deprecated: true
1025
1194
  },
1195
+ "accept-charset": {},
1196
+ action: {
1197
+ enum: [/^\s*\S+\s*$/]
1198
+ },
1026
1199
  autocomplete: {
1027
1200
  enum: ["on", "off"]
1028
1201
  },
1202
+ enctype: {
1203
+ enum: ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]
1204
+ },
1029
1205
  method: {
1030
1206
  enum: ["get", "post", "dialog"]
1031
1207
  },
1208
+ name: {},
1032
1209
  novalidate: {
1033
1210
  boolean: true
1034
1211
  },
@@ -1066,10 +1243,10 @@ var html5 = {
1066
1243
  return null;
1067
1244
  },
1068
1245
  list: true,
1069
- enum: ["/.+/"]
1246
+ enum: [validNonEmptyString]
1070
1247
  },
1071
1248
  target: {
1072
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
1249
+ enum: [validBrowsingContextName, "_blank", "_self", "_parent", "_top"]
1073
1250
  }
1074
1251
  },
1075
1252
  aria: {
@@ -1101,6 +1278,7 @@ var html5 = {
1101
1278
  source: "html5"
1102
1279
  }
1103
1280
  },
1281
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1104
1282
  h1: {
1105
1283
  flow: true,
1106
1284
  heading: true,
@@ -1114,6 +1292,7 @@ var html5 = {
1114
1292
  implicitRole: "heading"
1115
1293
  }
1116
1294
  },
1295
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1117
1296
  h2: {
1118
1297
  flow: true,
1119
1298
  heading: true,
@@ -1127,6 +1306,7 @@ var html5 = {
1127
1306
  implicitRole: "heading"
1128
1307
  }
1129
1308
  },
1309
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1130
1310
  h3: {
1131
1311
  flow: true,
1132
1312
  heading: true,
@@ -1140,6 +1320,7 @@ var html5 = {
1140
1320
  implicitRole: "heading"
1141
1321
  }
1142
1322
  },
1323
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1143
1324
  h4: {
1144
1325
  flow: true,
1145
1326
  heading: true,
@@ -1153,6 +1334,7 @@ var html5 = {
1153
1334
  implicitRole: "heading"
1154
1335
  }
1155
1336
  },
1337
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1156
1338
  h5: {
1157
1339
  flow: true,
1158
1340
  heading: true,
@@ -1166,6 +1348,7 @@ var html5 = {
1166
1348
  implicitRole: "heading"
1167
1349
  }
1168
1350
  },
1351
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1169
1352
  h6: {
1170
1353
  flow: true,
1171
1354
  heading: true,
@@ -1179,6 +1362,7 @@ var html5 = {
1179
1362
  implicitRole: "heading"
1180
1363
  }
1181
1364
  },
1365
+ /* https://html.spec.whatwg.org/multipage/document-metadata.html#the-head-element */
1182
1366
  head: {
1183
1367
  implicitClosed: ["body", "@flow-not-meta"],
1184
1368
  optionalEnd: true,
@@ -1194,6 +1378,7 @@ var html5 = {
1194
1378
  naming: "prohibited"
1195
1379
  }
1196
1380
  },
1381
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-header-element */
1197
1382
  header: {
1198
1383
  flow: true,
1199
1384
  aria: {
@@ -1215,6 +1400,7 @@ var html5 = {
1215
1400
  permittedContent: ["@flow"],
1216
1401
  permittedDescendants: [{ exclude: ["header", "footer", "main"] }]
1217
1402
  },
1403
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-hgroup-element */
1218
1404
  hgroup: {
1219
1405
  flow: true,
1220
1406
  heading: true,
@@ -1225,6 +1411,7 @@ var html5 = {
1225
1411
  implicitRole: "group"
1226
1412
  }
1227
1413
  },
1414
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-hr-element */
1228
1415
  hr: {
1229
1416
  flow: true,
1230
1417
  void: true,
@@ -1249,6 +1436,7 @@ var html5 = {
1249
1436
  implicitRole: "separator"
1250
1437
  }
1251
1438
  },
1439
+ /* https://html.spec.whatwg.org/multipage/semantics.html#the-html-element */
1252
1440
  html: {
1253
1441
  implicitOpen: [
1254
1442
  { for: ["@meta"], open: "head" },
@@ -1271,6 +1459,7 @@ var html5 = {
1271
1459
  naming: "prohibited"
1272
1460
  }
1273
1461
  },
1462
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-i-element */
1274
1463
  i: {
1275
1464
  flow: true,
1276
1465
  phrasing: true,
@@ -1280,6 +1469,7 @@ var html5 = {
1280
1469
  naming: "prohibited"
1281
1470
  }
1282
1471
  },
1472
+ /* https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element */
1283
1473
  iframe: {
1284
1474
  flow: true,
1285
1475
  phrasing: true,
@@ -1302,7 +1492,7 @@ var html5 = {
1302
1492
  deprecated: true
1303
1493
  },
1304
1494
  height: {
1305
- enum: ["/\\d+/"]
1495
+ enum: [validPositiveInteger]
1306
1496
  },
1307
1497
  hspace: {
1308
1498
  deprecated: true
@@ -1320,7 +1510,7 @@ var html5 = {
1320
1510
  deprecated: true
1321
1511
  },
1322
1512
  src: {
1323
- enum: ["/.+/"]
1513
+ enum: [validNonEmptyString]
1324
1514
  },
1325
1515
  title: {
1326
1516
  required: true
@@ -1329,11 +1519,12 @@ var html5 = {
1329
1519
  deprecated: true
1330
1520
  },
1331
1521
  width: {
1332
- enum: ["/\\d+/"]
1522
+ enum: [validPositiveInteger]
1333
1523
  }
1334
1524
  },
1335
1525
  permittedContent: []
1336
1526
  },
1527
+ /* https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element */
1337
1528
  img: {
1338
1529
  flow: true,
1339
1530
  phrasing: true,
@@ -1346,6 +1537,7 @@ var html5 = {
1346
1537
  align: {
1347
1538
  deprecated: true
1348
1539
  },
1540
+ alt: {},
1349
1541
  border: {
1350
1542
  deprecated: true
1351
1543
  },
@@ -1362,8 +1554,12 @@ var html5 = {
1362
1554
  decoding: {
1363
1555
  enum: ["sync", "async", "auto"]
1364
1556
  },
1557
+ fetchpriority: {
1558
+ omit: true,
1559
+ enum: ["high", "low", "auto"]
1560
+ },
1365
1561
  height: {
1366
- enum: ["/\\d+/"]
1562
+ enum: [validPositiveInteger]
1367
1563
  },
1368
1564
  hspace: {
1369
1565
  deprecated: true
@@ -1371,6 +1567,10 @@ var html5 = {
1371
1567
  ismap: {
1372
1568
  boolean: true
1373
1569
  },
1570
+ loading: {
1571
+ omit: true,
1572
+ enum: ["lazy", "eager"]
1573
+ },
1374
1574
  lowsrc: {
1375
1575
  deprecated: true
1376
1576
  },
@@ -1380,18 +1580,20 @@ var html5 = {
1380
1580
  referrerpolicy: {
1381
1581
  enum: ReferrerPolicy
1382
1582
  },
1583
+ sizes: {},
1383
1584
  src: {
1384
1585
  required: true,
1385
- enum: ["/.+/"]
1586
+ enum: [validNonEmptyString]
1386
1587
  },
1387
1588
  srcset: {
1388
1589
  enum: ["/[^]+/"]
1389
1590
  },
1591
+ usemap: {},
1390
1592
  vspace: {
1391
1593
  deprecated: true
1392
1594
  },
1393
1595
  width: {
1394
- enum: ["/\\d+/"]
1596
+ enum: [validPositiveInteger]
1395
1597
  }
1396
1598
  },
1397
1599
  aria: {
@@ -1419,6 +1621,7 @@ var html5 = {
1419
1621
  }
1420
1622
  }
1421
1623
  },
1624
+ /* https://html.spec.whatwg.org/multipage/input.html#the-input-element */
1422
1625
  input: {
1423
1626
  flow: true,
1424
1627
  focusable(node) {
@@ -1441,9 +1644,18 @@ var html5 = {
1441
1644
  return type === "submit" || type === "image";
1442
1645
  },
1443
1646
  attributes: {
1647
+ accept: {},
1444
1648
  align: {
1445
1649
  deprecated: true
1446
1650
  },
1651
+ alpha: {
1652
+ boolean: true
1653
+ },
1654
+ alt: {},
1655
+ autocapitalize: {
1656
+ enum: ["off", "none", "on", "sentences", "words", "characters"]
1657
+ },
1658
+ autocomplete: {},
1447
1659
  autofocus: {
1448
1660
  boolean: true
1449
1661
  },
@@ -1454,6 +1666,9 @@ var html5 = {
1454
1666
  checked: {
1455
1667
  boolean: true
1456
1668
  },
1669
+ colorspace: {
1670
+ enum: ["limited-srgb", "display-p3"]
1671
+ },
1457
1672
  datafld: {
1458
1673
  deprecated: true
1459
1674
  },
@@ -1463,9 +1678,14 @@ var html5 = {
1463
1678
  datasrc: {
1464
1679
  deprecated: true
1465
1680
  },
1681
+ dirname: {},
1466
1682
  disabled: {
1467
1683
  boolean: true
1468
1684
  },
1685
+ form: {
1686
+ enum: [validId],
1687
+ reference: "id"
1688
+ },
1469
1689
  formaction: {
1470
1690
  allowed: allowedIfAttributeHasValue("type", ["submit", "image"], {
1471
1691
  defaultValue: "submit"
@@ -1492,7 +1712,10 @@ var html5 = {
1492
1712
  allowed: allowedIfAttributeHasValue("type", ["submit", "image"], {
1493
1713
  defaultValue: "submit"
1494
1714
  }),
1495
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
1715
+ enum: [validBrowsingContextName, "_blank", "_self", "_parent", "_top"]
1716
+ },
1717
+ height: {
1718
+ enum: [validPositiveInteger]
1496
1719
  },
1497
1720
  hspace: {
1498
1721
  deprecated: true
@@ -1503,15 +1726,50 @@ var html5 = {
1503
1726
  ismap: {
1504
1727
  deprecated: true
1505
1728
  },
1729
+ list: {
1730
+ enum: [validId],
1731
+ reference: "id"
1732
+ },
1733
+ max: {
1734
+ enum: [validNonEmptyString]
1735
+ },
1736
+ maxlength: {
1737
+ enum: [validPositiveInteger]
1738
+ },
1739
+ min: {
1740
+ enum: [validNonEmptyString]
1741
+ },
1742
+ minlength: {
1743
+ enum: [validPositiveInteger]
1744
+ },
1506
1745
  multiple: {
1507
1746
  boolean: true
1508
1747
  },
1748
+ name: {
1749
+ enum: [validNonEmptyString]
1750
+ },
1751
+ pattern: {},
1752
+ placeholder: {},
1753
+ popovertarget: {
1754
+ enum: [validId],
1755
+ reference: "id"
1756
+ },
1757
+ popovertargetaction: {
1758
+ enum: ["toggle", "show", "hide"]
1759
+ },
1509
1760
  readonly: {
1510
1761
  boolean: true
1511
1762
  },
1512
1763
  required: {
1513
1764
  boolean: true
1514
1765
  },
1766
+ size: {
1767
+ enum: [validPositiveInteger]
1768
+ },
1769
+ src: {
1770
+ enum: [validNonEmptyString]
1771
+ },
1772
+ step: {},
1515
1773
  type: {
1516
1774
  enum: [
1517
1775
  "button",
@@ -1541,8 +1799,12 @@ var html5 = {
1541
1799
  usemap: {
1542
1800
  deprecated: true
1543
1801
  },
1802
+ value: {},
1544
1803
  vspace: {
1545
1804
  deprecated: true
1805
+ },
1806
+ width: {
1807
+ enum: [validPositiveInteger]
1546
1808
  }
1547
1809
  },
1548
1810
  aria: {
@@ -1607,20 +1869,27 @@ var html5 = {
1607
1869
  }
1608
1870
  }
1609
1871
  },
1872
+ /* https://html.spec.whatwg.org/multipage/edits.html#the-ins-element */
1610
1873
  ins: {
1611
1874
  flow: true,
1612
1875
  phrasing: true,
1613
1876
  transparent: true,
1877
+ attributes: {
1878
+ cite: {},
1879
+ datetime: {}
1880
+ },
1614
1881
  aria: {
1615
1882
  implicitRole: "insertion",
1616
1883
  naming: "prohibited"
1617
1884
  }
1618
1885
  },
1886
+ /* https://html.spec.whatwg.org/multipage/obsolete.html#isindex */
1619
1887
  isindex: {
1620
1888
  deprecated: {
1621
1889
  source: "html4"
1622
1890
  }
1623
1891
  },
1892
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-kbd-element */
1624
1893
  kbd: {
1625
1894
  flow: true,
1626
1895
  phrasing: true,
@@ -1637,6 +1906,7 @@ var html5 = {
1637
1906
  labelable: true,
1638
1907
  deprecated: true
1639
1908
  },
1909
+ /* https://html.spec.whatwg.org/multipage/forms.html#the-label-element */
1640
1910
  label: {
1641
1911
  flow: true,
1642
1912
  phrasing: true,
@@ -1654,13 +1924,15 @@ var html5 = {
1654
1924
  deprecated: true
1655
1925
  },
1656
1926
  for: {
1657
- enum: [validId]
1927
+ enum: [validId],
1928
+ reference: "id"
1658
1929
  }
1659
1930
  },
1660
1931
  aria: {
1661
1932
  naming: "prohibited"
1662
1933
  }
1663
1934
  },
1935
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-legend-element */
1664
1936
  legend: {
1665
1937
  permittedContent: ["@phrasing", "@heading"],
1666
1938
  attributes: {
@@ -1681,6 +1953,7 @@ var html5 = {
1681
1953
  naming: "prohibited"
1682
1954
  }
1683
1955
  },
1956
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-li-element */
1684
1957
  li: {
1685
1958
  implicitClosed: ["li"],
1686
1959
  permittedContent: ["@flow"],
@@ -1688,6 +1961,9 @@ var html5 = {
1688
1961
  attributes: {
1689
1962
  type: {
1690
1963
  deprecated: true
1964
+ },
1965
+ value: {
1966
+ enum: ["/-?\\d+/"]
1691
1967
  }
1692
1968
  },
1693
1969
  aria: {
@@ -1696,6 +1972,7 @@ var html5 = {
1696
1972
  }
1697
1973
  }
1698
1974
  },
1975
+ /* https://html.spec.whatwg.org/multipage/document-metadata.html#the-link-element */
1699
1976
  link: {
1700
1977
  metadata: true,
1701
1978
  flow(node) {
@@ -1756,7 +2033,7 @@ var html5 = {
1756
2033
  }
1757
2034
  return `{{ tagName }} is missing required "href" or "imagesrcset" attribute`;
1758
2035
  },
1759
- enum: ["/.+/"]
2036
+ enum: [validNonEmptyString]
1760
2037
  },
1761
2038
  imagesrcset: {
1762
2039
  allowed(node) {
@@ -1793,7 +2070,7 @@ var html5 = {
1793
2070
  },
1794
2071
  integrity: {
1795
2072
  allowed: allowedIfAttributeHasValue("rel", ["stylesheet", "preload", "modulepreload"]),
1796
- enum: ["/.+/"]
2073
+ enum: [validNonEmptyString]
1797
2074
  },
1798
2075
  methods: {
1799
2076
  deprecated: true
@@ -1830,7 +2107,7 @@ var html5 = {
1830
2107
  return null;
1831
2108
  },
1832
2109
  list: true,
1833
- enum: ["/.+/"]
2110
+ enum: [validNonEmptyString]
1834
2111
  },
1835
2112
  target: {
1836
2113
  deprecated: true
@@ -1848,12 +2125,14 @@ var html5 = {
1848
2125
  source: "html32"
1849
2126
  }
1850
2127
  },
2128
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-main-element */
1851
2129
  main: {
1852
2130
  flow: true,
1853
2131
  aria: {
1854
2132
  implicitRole: "main"
1855
2133
  }
1856
2134
  },
2135
+ /* https://html.spec.whatwg.org/multipage/image-maps.html#the-map-element */
1857
2136
  map: {
1858
2137
  flow: true,
1859
2138
  phrasing: true,
@@ -1868,6 +2147,7 @@ var html5 = {
1868
2147
  naming: "prohibited"
1869
2148
  }
1870
2149
  },
2150
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-mark-element */
1871
2151
  mark: {
1872
2152
  flow: true,
1873
2153
  phrasing: true,
@@ -1893,6 +2173,7 @@ var html5 = {
1893
2173
  }
1894
2174
  }
1895
2175
  },
2176
+ /* https://html.spec.whatwg.org/multipage/embedded-content.html#mathml */
1896
2177
  math: {
1897
2178
  flow: true,
1898
2179
  foreign: true,
@@ -1925,6 +2206,7 @@ var html5 = {
1925
2206
  implicitRole: "math"
1926
2207
  }
1927
2208
  },
2209
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-menu-element */
1928
2210
  menu: {
1929
2211
  flow: true,
1930
2212
  aria: {
@@ -1932,6 +2214,7 @@ var html5 = {
1932
2214
  },
1933
2215
  permittedContent: ["@script", "li"]
1934
2216
  },
2217
+ /* https://html.spec.whatwg.org/multipage/semantics.html#the-meta-element */
1935
2218
  meta: {
1936
2219
  flow(node) {
1937
2220
  return node.hasAttribute("itemprop");
@@ -1965,10 +2248,31 @@ var html5 = {
1965
2248
  naming: "prohibited"
1966
2249
  }
1967
2250
  },
2251
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-meter-element */
1968
2252
  meter: {
1969
2253
  flow: true,
1970
2254
  phrasing: true,
1971
2255
  labelable: true,
2256
+ attributes: {
2257
+ high: {
2258
+ enum: [validFloatingPoint]
2259
+ },
2260
+ low: {
2261
+ enum: [validFloatingPoint]
2262
+ },
2263
+ max: {
2264
+ enum: [validFloatingPoint]
2265
+ },
2266
+ min: {
2267
+ enum: [validFloatingPoint]
2268
+ },
2269
+ optimum: {
2270
+ enum: [validFloatingPoint]
2271
+ },
2272
+ value: {
2273
+ enum: [validFloatingPoint]
2274
+ }
2275
+ },
1972
2276
  aria: {
1973
2277
  implicitRole: "meter"
1974
2278
  },
@@ -1982,6 +2286,7 @@ var html5 = {
1982
2286
  source: "html5"
1983
2287
  }
1984
2288
  },
2289
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-nav-element */
1985
2290
  nav: {
1986
2291
  flow: true,
1987
2292
  sectioning: true,
@@ -2013,6 +2318,7 @@ var html5 = {
2013
2318
  source: "html5"
2014
2319
  }
2015
2320
  },
2321
+ /* https://html.spec.whatwg.org/multipage/scripting.html#the-noscript-element */
2016
2322
  noscript: {
2017
2323
  metadata: true,
2018
2324
  flow: true,
@@ -2023,6 +2329,7 @@ var html5 = {
2023
2329
  naming: "prohibited"
2024
2330
  }
2025
2331
  },
2332
+ /* https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element */
2026
2333
  object: {
2027
2334
  flow: true,
2028
2335
  phrasing: true,
@@ -2062,7 +2369,7 @@ var html5 = {
2062
2369
  deprecated: true
2063
2370
  },
2064
2371
  data: {
2065
- enum: ["/.+/"],
2372
+ enum: [validNonEmptyString],
2066
2373
  required: true
2067
2374
  },
2068
2375
  datafld: {
@@ -2078,13 +2385,13 @@ var html5 = {
2078
2385
  deprecated: true
2079
2386
  },
2080
2387
  height: {
2081
- enum: ["/\\d+/"]
2388
+ enum: [validPositiveInteger]
2082
2389
  },
2083
2390
  hspace: {
2084
2391
  deprecated: true
2085
2392
  },
2086
2393
  name: {
2087
- enum: ["/[^_].*/"]
2394
+ enum: [validBrowsingContextName]
2088
2395
  },
2089
2396
  standby: {
2090
2397
  deprecated: true
@@ -2093,12 +2400,13 @@ var html5 = {
2093
2400
  deprecated: true
2094
2401
  },
2095
2402
  width: {
2096
- enum: ["/\\d+/"]
2403
+ enum: [validPositiveInteger]
2097
2404
  }
2098
2405
  },
2099
2406
  permittedContent: ["param", "@flow"],
2100
2407
  permittedOrder: ["param", "@flow"]
2101
2408
  },
2409
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-ol-element */
2102
2410
  ol: {
2103
2411
  flow: true,
2104
2412
  attributes: {
@@ -2108,6 +2416,9 @@ var html5 = {
2108
2416
  reversed: {
2109
2417
  boolean: true
2110
2418
  },
2419
+ start: {
2420
+ enum: [validPositiveInteger]
2421
+ },
2111
2422
  type: {
2112
2423
  enum: ["a", "A", "i", "I", "1"]
2113
2424
  }
@@ -2117,18 +2428,21 @@ var html5 = {
2117
2428
  },
2118
2429
  permittedContent: ["@script", "li"]
2119
2430
  },
2431
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-optgroup-element */
2120
2432
  optgroup: {
2121
2433
  implicitClosed: ["optgroup"],
2122
2434
  attributes: {
2123
2435
  disabled: {
2124
2436
  boolean: true
2125
- }
2437
+ },
2438
+ label: {}
2126
2439
  },
2127
2440
  aria: {
2128
2441
  implicitRole: "group"
2129
2442
  },
2130
2443
  permittedContent: ["@script", "option"]
2131
2444
  },
2445
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-option-element */
2132
2446
  option: {
2133
2447
  implicitClosed: ["option"],
2134
2448
  attributes: {
@@ -2141,6 +2455,7 @@ var html5 = {
2141
2455
  disabled: {
2142
2456
  boolean: true
2143
2457
  },
2458
+ label: {},
2144
2459
  name: {
2145
2460
  deprecated: true
2146
2461
  },
@@ -2155,6 +2470,7 @@ var html5 = {
2155
2470
  permittedContent: ["@phrasing", "div"],
2156
2471
  permittedDescendants: [{ exclude: ["@interactive", "datalist", "object"] }]
2157
2472
  },
2473
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-output-element */
2158
2474
  output: {
2159
2475
  flow: true,
2160
2476
  phrasing: true,
@@ -2163,11 +2479,26 @@ var html5 = {
2163
2479
  listed: true
2164
2480
  },
2165
2481
  labelable: true,
2482
+ attributes: {
2483
+ for: {
2484
+ list: true,
2485
+ enum: [validId],
2486
+ reference: "id"
2487
+ },
2488
+ form: {
2489
+ enum: [validId],
2490
+ reference: "id"
2491
+ },
2492
+ name: {
2493
+ enum: [validNonEmptyString]
2494
+ }
2495
+ },
2166
2496
  aria: {
2167
2497
  implicitRole: "status"
2168
2498
  },
2169
2499
  permittedContent: ["@phrasing"]
2170
2500
  },
2501
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-p-element */
2171
2502
  p: {
2172
2503
  flow: true,
2173
2504
  implicitClosed: [
@@ -2235,6 +2566,7 @@ var html5 = {
2235
2566
  naming: "prohibited"
2236
2567
  }
2237
2568
  },
2569
+ /* https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element */
2238
2570
  picture: {
2239
2571
  flow: true,
2240
2572
  phrasing: true,
@@ -2252,6 +2584,7 @@ var html5 = {
2252
2584
  source: "html2"
2253
2585
  }
2254
2586
  },
2587
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element */
2255
2588
  pre: {
2256
2589
  flow: true,
2257
2590
  permittedContent: ["@phrasing"],
@@ -2265,19 +2598,32 @@ var html5 = {
2265
2598
  naming: "prohibited"
2266
2599
  }
2267
2600
  },
2601
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-progress-element */
2268
2602
  progress: {
2269
2603
  flow: true,
2270
2604
  phrasing: true,
2271
2605
  labelable: true,
2606
+ attributes: {
2607
+ max: {
2608
+ enum: [validFloatingPoint]
2609
+ },
2610
+ value: {
2611
+ enum: [validFloatingPoint]
2612
+ }
2613
+ },
2272
2614
  aria: {
2273
2615
  implicitRole: "progressbar"
2274
2616
  },
2275
2617
  permittedContent: ["@phrasing"],
2276
2618
  permittedDescendants: [{ exclude: "progress" }]
2277
2619
  },
2620
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-q-element */
2278
2621
  q: {
2279
2622
  flow: true,
2280
2623
  phrasing: true,
2624
+ attributes: {
2625
+ cite: {}
2626
+ },
2281
2627
  permittedContent: ["@phrasing"],
2282
2628
  aria: {
2283
2629
  implicitRole: "generic",
@@ -2288,6 +2634,7 @@ var html5 = {
2288
2634
  implicitClosed: ["rb", "rt", "rtc", "rp"],
2289
2635
  permittedContent: ["@phrasing"]
2290
2636
  },
2637
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-rp-element */
2291
2638
  rp: {
2292
2639
  implicitClosed: ["rb", "rt", "rtc", "rp"],
2293
2640
  permittedContent: ["@phrasing"],
@@ -2295,6 +2642,7 @@ var html5 = {
2295
2642
  naming: "prohibited"
2296
2643
  }
2297
2644
  },
2645
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-rt-element */
2298
2646
  rt: {
2299
2647
  implicitClosed: ["rb", "rt", "rtc", "rp"],
2300
2648
  permittedContent: ["@phrasing"],
@@ -2306,11 +2654,13 @@ var html5 = {
2306
2654
  implicitClosed: ["rb", "rtc", "rp"],
2307
2655
  permittedContent: ["@phrasing", "rt"]
2308
2656
  },
2657
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-ruby-element */
2309
2658
  ruby: {
2310
2659
  flow: true,
2311
2660
  phrasing: true,
2312
2661
  permittedContent: ["@phrasing", "rb", "rp", "rt", "rtc"]
2313
2662
  },
2663
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-s-element */
2314
2664
  s: {
2315
2665
  flow: true,
2316
2666
  phrasing: true,
@@ -2320,6 +2670,7 @@ var html5 = {
2320
2670
  naming: "prohibited"
2321
2671
  }
2322
2672
  },
2673
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-samp-element */
2323
2674
  samp: {
2324
2675
  flow: true,
2325
2676
  phrasing: true,
@@ -2329,6 +2680,7 @@ var html5 = {
2329
2680
  naming: "prohibited"
2330
2681
  }
2331
2682
  },
2683
+ /* https://html.spec.whatwg.org/multipage/scripting.html#the-script-element */
2332
2684
  script: {
2333
2685
  metadata: true,
2334
2686
  flow: true,
@@ -2338,6 +2690,10 @@ var html5 = {
2338
2690
  async: {
2339
2691
  boolean: true
2340
2692
  },
2693
+ blocking: {
2694
+ list: true,
2695
+ enum: ["render"]
2696
+ },
2341
2697
  crossorigin: {
2342
2698
  omit: true,
2343
2699
  enum: ["anonymous", "use-credentials"]
@@ -2348,12 +2704,15 @@ var html5 = {
2348
2704
  event: {
2349
2705
  deprecated: true
2350
2706
  },
2707
+ fetchpriority: {
2708
+ enum: ["high", "low", "auto"]
2709
+ },
2351
2710
  for: {
2352
2711
  deprecated: true
2353
2712
  },
2354
2713
  integrity: {
2355
2714
  allowed: allowedIfAttributeIsPresent("src"),
2356
- enum: ["/.+/"]
2715
+ enum: [validNonEmptyString]
2357
2716
  },
2358
2717
  language: {
2359
2718
  deprecated: true
@@ -2365,19 +2724,22 @@ var html5 = {
2365
2724
  enum: ReferrerPolicy
2366
2725
  },
2367
2726
  src: {
2368
- enum: ["/.+/"]
2369
- }
2727
+ enum: [validNonEmptyString]
2728
+ },
2729
+ type: {}
2370
2730
  },
2371
2731
  aria: {
2372
2732
  naming: "prohibited"
2373
2733
  }
2374
2734
  },
2735
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-search-element */
2375
2736
  search: {
2376
2737
  flow: true,
2377
2738
  aria: {
2378
2739
  implicitRole: "search"
2379
2740
  }
2380
2741
  },
2742
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-section-element */
2381
2743
  section: {
2382
2744
  flow: true,
2383
2745
  sectioning: true,
@@ -2389,6 +2751,7 @@ var html5 = {
2389
2751
  },
2390
2752
  permittedContent: ["@flow"]
2391
2753
  },
2754
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element */
2392
2755
  select: {
2393
2756
  flow: true,
2394
2757
  focusable: true,
@@ -2400,20 +2763,28 @@ var html5 = {
2400
2763
  },
2401
2764
  labelable: true,
2402
2765
  attributes: {
2766
+ autocomplete: {},
2403
2767
  autofocus: {
2404
2768
  boolean: true
2405
2769
  },
2406
2770
  disabled: {
2407
2771
  boolean: true
2408
2772
  },
2773
+ form: {
2774
+ enum: [validId],
2775
+ reference: "id"
2776
+ },
2409
2777
  multiple: {
2410
2778
  boolean: true
2411
2779
  },
2780
+ name: {
2781
+ enum: [validNonEmptyString]
2782
+ },
2412
2783
  required: {
2413
2784
  boolean: true
2414
2785
  },
2415
2786
  size: {
2416
- enum: ["/\\d+/"]
2787
+ enum: [validPositiveInteger]
2417
2788
  }
2418
2789
  },
2419
2790
  aria: {
@@ -2452,6 +2823,7 @@ var html5 = {
2452
2823
  ],
2453
2824
  permittedOrder: ["button", "option, optgroup, hr"]
2454
2825
  },
2826
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-selectedcontent-element */
2455
2827
  selectedcontent: {
2456
2828
  phrasing: true,
2457
2829
  permittedContent: [],
@@ -2462,6 +2834,7 @@ var html5 = {
2462
2834
  naming: "prohibited"
2463
2835
  }
2464
2836
  },
2837
+ /* https://html.spec.whatwg.org/multipage/scripting.html#the-slot-element */
2465
2838
  slot: {
2466
2839
  flow: true,
2467
2840
  phrasing: true,
@@ -2473,6 +2846,7 @@ var html5 = {
2473
2846
  name: {}
2474
2847
  }
2475
2848
  },
2849
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-small-element */
2476
2850
  small: {
2477
2851
  flow: true,
2478
2852
  phrasing: true,
@@ -2482,6 +2856,7 @@ var html5 = {
2482
2856
  naming: "prohibited"
2483
2857
  }
2484
2858
  },
2859
+ /* https://html.spec.whatwg.org/multipage/embedded-content.html#the-source-element */
2485
2860
  source: {
2486
2861
  void: true,
2487
2862
  attributes: {
@@ -2498,11 +2873,11 @@ var html5 = {
2498
2873
  },
2499
2874
  width: {
2500
2875
  allowed: allowedIfParentIsPresent("picture"),
2501
- enum: ["/\\d+/"]
2876
+ enum: [validPositiveInteger]
2502
2877
  },
2503
2878
  height: {
2504
2879
  allowed: allowedIfParentIsPresent("picture"),
2505
- enum: ["/\\d+/"]
2880
+ enum: [validPositiveInteger]
2506
2881
  }
2507
2882
  },
2508
2883
  aria: {
@@ -2516,6 +2891,7 @@ var html5 = {
2516
2891
  source: "non-standard"
2517
2892
  }
2518
2893
  },
2894
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-span-element */
2519
2895
  span: {
2520
2896
  flow: true,
2521
2897
  phrasing: true,
@@ -2543,6 +2919,7 @@ var html5 = {
2543
2919
  source: "html5"
2544
2920
  }
2545
2921
  },
2922
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-strong-element */
2546
2923
  strong: {
2547
2924
  flow: true,
2548
2925
  phrasing: true,
@@ -2552,12 +2929,14 @@ var html5 = {
2552
2929
  naming: "prohibited"
2553
2930
  }
2554
2931
  },
2932
+ /* https://html.spec.whatwg.org/multipage/semantics.html#the-style-element */
2555
2933
  style: {
2556
2934
  metadata: true,
2557
2935
  aria: {
2558
2936
  naming: "prohibited"
2559
2937
  }
2560
2938
  },
2939
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-sub-and-sup-elements */
2561
2940
  sub: {
2562
2941
  flow: true,
2563
2942
  phrasing: true,
@@ -2567,6 +2946,7 @@ var html5 = {
2567
2946
  naming: "prohibited"
2568
2947
  }
2569
2948
  },
2949
+ /* https://html.spec.whatwg.org/multipage/interactive-elements.html#the-summary-element */
2570
2950
  summary: {
2571
2951
  permittedContent: ["@phrasing", "@heading"],
2572
2952
  focusable(node) {
@@ -2576,6 +2956,7 @@ var html5 = {
2576
2956
  implicitRole: "button"
2577
2957
  }
2578
2958
  },
2959
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-sub-and-sup-elements */
2579
2960
  sup: {
2580
2961
  flow: true,
2581
2962
  phrasing: true,
@@ -2585,6 +2966,7 @@ var html5 = {
2585
2966
  naming: "prohibited"
2586
2967
  }
2587
2968
  },
2969
+ /* https://html.spec.whatwg.org/multipage/embedded-content.html#svg-0 */
2588
2970
  svg: {
2589
2971
  flow: true,
2590
2972
  foreign: true,
@@ -2604,6 +2986,7 @@ var html5 = {
2604
2986
  * "no-unknown-elements" they are added here */
2605
2987
  "svg:desc": {},
2606
2988
  "svg:title": {},
2989
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-table-element */
2607
2990
  table: {
2608
2991
  flow: true,
2609
2992
  permittedContent: ["@script", "caption?", "colgroup", "tbody", "tfoot?", "thead?", "tr"],
@@ -2653,6 +3036,7 @@ var html5 = {
2653
3036
  implicitRole: "table"
2654
3037
  }
2655
3038
  },
3039
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-tbody-element */
2656
3040
  tbody: {
2657
3041
  implicitClosed: ["tbody", "tfoot"],
2658
3042
  permittedContent: ["@script", "tr"],
@@ -2677,6 +3061,7 @@ var html5 = {
2677
3061
  implicitRole: "rowgroup"
2678
3062
  }
2679
3063
  },
3064
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-td-element */
2680
3065
  td: {
2681
3066
  flow: true,
2682
3067
  implicitClosed: ["td", "th", "tr", "tbody", "tfoot"],
@@ -2700,7 +3085,12 @@ var html5 = {
2700
3085
  deprecated: true
2701
3086
  },
2702
3087
  colspan: {
2703
- enum: ["/\\d+/"]
3088
+ enum: [validPositiveInteger]
3089
+ },
3090
+ headers: {
3091
+ list: true,
3092
+ enum: [validId],
3093
+ reference: "id"
2704
3094
  },
2705
3095
  height: {
2706
3096
  deprecated: true
@@ -2709,7 +3099,7 @@ var html5 = {
2709
3099
  deprecated: true
2710
3100
  },
2711
3101
  rowspan: {
2712
- enum: ["/\\d+/"]
3102
+ enum: [validPositiveInteger]
2713
3103
  },
2714
3104
  scope: {
2715
3105
  deprecated: true
@@ -2738,16 +3128,38 @@ var html5 = {
2738
3128
  },
2739
3129
  permittedContent: ["@flow"]
2740
3130
  },
3131
+ /* https://html.spec.whatwg.org/multipage/scripting.html#the-template-element */
2741
3132
  template: {
2742
3133
  metadata: true,
2743
3134
  flow: true,
2744
3135
  phrasing: true,
2745
3136
  scriptSupporting: true,
2746
3137
  templateRoot: true,
3138
+ attributes: {
3139
+ shadowrootclonable: {
3140
+ boolean: true
3141
+ },
3142
+ shadowrootcustomelementregistry: {
3143
+ boolean: true
3144
+ },
3145
+ shadowrootdelegatesfocus: {
3146
+ boolean: true
3147
+ },
3148
+ shadowrootmode: {
3149
+ enum: ["open", "closed"]
3150
+ },
3151
+ shadowrootserializable: {
3152
+ boolean: true
3153
+ },
3154
+ shadowrootslotassignment: {
3155
+ enum: ["named", "manual"]
3156
+ }
3157
+ },
2747
3158
  aria: {
2748
3159
  naming: "prohibited"
2749
3160
  }
2750
3161
  },
3162
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element */
2751
3163
  textarea: {
2752
3164
  flow: true,
2753
3165
  focusable: true,
@@ -2764,7 +3176,7 @@ var html5 = {
2764
3176
  boolean: true
2765
3177
  },
2766
3178
  cols: {
2767
- enum: ["/\\d+/"]
3179
+ enum: [validPositiveInteger]
2768
3180
  },
2769
3181
  datafld: {
2770
3182
  deprecated: true
@@ -2772,15 +3184,26 @@ var html5 = {
2772
3184
  datasrc: {
2773
3185
  deprecated: true
2774
3186
  },
3187
+ dirname: {
3188
+ enum: [validNonEmptyString]
3189
+ },
2775
3190
  disabled: {
2776
3191
  boolean: true
2777
3192
  },
3193
+ form: {
3194
+ enum: [validId],
3195
+ reference: "id"
3196
+ },
2778
3197
  maxlength: {
2779
- enum: ["/\\d+/"]
3198
+ enum: [validPositiveInteger]
2780
3199
  },
2781
3200
  minlength: {
2782
- enum: ["/\\d+/"]
3201
+ enum: [validPositiveInteger]
2783
3202
  },
3203
+ name: {
3204
+ enum: [validNonEmptyString]
3205
+ },
3206
+ placeholder: {},
2784
3207
  readonly: {
2785
3208
  boolean: true
2786
3209
  },
@@ -2788,7 +3211,7 @@ var html5 = {
2788
3211
  boolean: true
2789
3212
  },
2790
3213
  rows: {
2791
- enum: ["/\\d+/"]
3214
+ enum: [validPositiveInteger]
2792
3215
  },
2793
3216
  wrap: {
2794
3217
  enum: ["hard", "soft"]
@@ -2799,6 +3222,7 @@ var html5 = {
2799
3222
  },
2800
3223
  permittedContent: []
2801
3224
  },
3225
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-tfoot-element */
2802
3226
  tfoot: {
2803
3227
  implicitClosed: ["tbody"],
2804
3228
  optionalEnd: true,
@@ -2824,10 +3248,12 @@ var html5 = {
2824
3248
  implicitRole: "rowgroup"
2825
3249
  }
2826
3250
  },
3251
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-th-element */
2827
3252
  th: {
2828
3253
  flow: true,
2829
3254
  implicitClosed: ["td", "th", "tr", "tbody", "tfoot"],
2830
3255
  attributes: {
3256
+ abbr: {},
2831
3257
  align: {
2832
3258
  deprecated: true
2833
3259
  },
@@ -2843,11 +3269,16 @@ var html5 = {
2843
3269
  char: {
2844
3270
  deprecated: true
2845
3271
  },
3272
+ headers: {
3273
+ list: true,
3274
+ enum: [validId],
3275
+ reference: "id"
3276
+ },
2846
3277
  charoff: {
2847
3278
  deprecated: true
2848
3279
  },
2849
3280
  colspan: {
2850
- enum: ["/\\d+/"]
3281
+ enum: [validPositiveInteger]
2851
3282
  },
2852
3283
  height: {
2853
3284
  deprecated: true
@@ -2856,7 +3287,7 @@ var html5 = {
2856
3287
  deprecated: true
2857
3288
  },
2858
3289
  rowspan: {
2859
- enum: ["/\\d+/"]
3290
+ enum: [validPositiveInteger]
2860
3291
  },
2861
3292
  scope: {
2862
3293
  enum: ["row", "col", "rowgroup", "colgroup"]
@@ -2889,6 +3320,7 @@ var html5 = {
2889
3320
  permittedContent: ["@flow"],
2890
3321
  permittedDescendants: [{ exclude: ["header", "footer", "@sectioning", "@heading"] }]
2891
3322
  },
3323
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-thead-element */
2892
3324
  thead: {
2893
3325
  implicitClosed: ["tbody", "tfoot"],
2894
3326
  optionalEnd: true,
@@ -2914,15 +3346,20 @@ var html5 = {
2914
3346
  implicitRole: "rowgroup"
2915
3347
  }
2916
3348
  },
3349
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-time-element */
2917
3350
  time: {
2918
3351
  flow: true,
2919
3352
  phrasing: true,
3353
+ attributes: {
3354
+ datetime: {}
3355
+ },
2920
3356
  aria: {
2921
3357
  implicitRole: "time",
2922
3358
  naming: "prohibited"
2923
3359
  },
2924
3360
  permittedContent: ["@phrasing"]
2925
3361
  },
3362
+ /* https://html.spec.whatwg.org/multipage/document-metadata.html#the-title-element */
2926
3363
  title: {
2927
3364
  metadata: true,
2928
3365
  permittedContent: [],
@@ -2931,6 +3368,7 @@ var html5 = {
2931
3368
  naming: "prohibited"
2932
3369
  }
2933
3370
  },
3371
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-tr-element */
2934
3372
  tr: {
2935
3373
  implicitClosed: ["tr", "tbody", "tfoot"],
2936
3374
  permittedContent: ["@script", "td", "th"],
@@ -2958,8 +3396,24 @@ var html5 = {
2958
3396
  implicitRole: "row"
2959
3397
  }
2960
3398
  },
3399
+ /* https://html.spec.whatwg.org/multipage/media.html#the-track-element */
2961
3400
  track: {
2962
3401
  void: true,
3402
+ attributes: {
3403
+ default: {
3404
+ boolean: true
3405
+ },
3406
+ kind: {
3407
+ omit: true,
3408
+ enum: ["subtitles", "captions", "descriptions", "chapters", "metadata"]
3409
+ },
3410
+ label: {},
3411
+ src: {
3412
+ required: true,
3413
+ enum: [validNonEmptyString]
3414
+ },
3415
+ srclang: {}
3416
+ },
2963
3417
  aria: {
2964
3418
  naming: "prohibited"
2965
3419
  }
@@ -2970,6 +3424,7 @@ var html5 = {
2970
3424
  source: "html4"
2971
3425
  }
2972
3426
  },
3427
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-u-element */
2973
3428
  u: {
2974
3429
  flow: true,
2975
3430
  phrasing: true,
@@ -2979,6 +3434,7 @@ var html5 = {
2979
3434
  naming: "prohibited"
2980
3435
  }
2981
3436
  },
3437
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-ul-element */
2982
3438
  ul: {
2983
3439
  flow: true,
2984
3440
  permittedContent: ["@script", "li"],
@@ -2994,6 +3450,7 @@ var html5 = {
2994
3450
  implicitRole: "list"
2995
3451
  }
2996
3452
  },
3453
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-var-element */
2997
3454
  var: {
2998
3455
  flow: true,
2999
3456
  phrasing: true,
@@ -3002,6 +3459,7 @@ var html5 = {
3002
3459
  naming: "prohibited"
3003
3460
  }
3004
3461
  },
3462
+ /* https://html.spec.whatwg.org/multipage/media.html#the-video-element */
3005
3463
  video: {
3006
3464
  flow: true,
3007
3465
  focusable(node) {
@@ -3014,28 +3472,50 @@ var html5 = {
3014
3472
  },
3015
3473
  transparent: ["@flow"],
3016
3474
  attributes: {
3475
+ autoplay: {
3476
+ boolean: true
3477
+ },
3478
+ controls: {
3479
+ boolean: true
3480
+ },
3017
3481
  crossorigin: {
3018
3482
  omit: true,
3019
3483
  enum: ["anonymous", "use-credentials"]
3020
3484
  },
3021
3485
  height: {
3022
- enum: ["/\\d+/"]
3486
+ enum: [validPositiveInteger]
3023
3487
  },
3024
3488
  itemprop: {
3025
3489
  allowed: allowedIfAttributeIsPresent("src")
3026
3490
  },
3491
+ loop: {
3492
+ boolean: true
3493
+ },
3494
+ muted: {
3495
+ boolean: true
3496
+ },
3497
+ playsinline: {
3498
+ boolean: true
3499
+ },
3500
+ poster: {
3501
+ enum: [validNonEmptyString]
3502
+ },
3027
3503
  preload: {
3028
3504
  omit: true,
3029
3505
  enum: ["none", "metadata", "auto"]
3030
3506
  },
3507
+ src: {
3508
+ enum: [validNonEmptyString]
3509
+ },
3031
3510
  width: {
3032
- enum: ["/\\d+/"]
3511
+ enum: [validPositiveInteger]
3033
3512
  }
3034
3513
  },
3035
3514
  permittedContent: ["@flow", "track", "source"],
3036
3515
  permittedDescendants: [{ exclude: ["audio", "video"] }],
3037
3516
  permittedOrder: ["source", "track", "@flow"]
3038
3517
  },
3518
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-wbr-element */
3039
3519
  wbr: {
3040
3520
  flow: true,
3041
3521
  phrasing: true,
@@ -3044,6 +3524,7 @@ var html5 = {
3044
3524
  naming: "prohibited"
3045
3525
  }
3046
3526
  },
3527
+ /* https://html.spec.whatwg.org/multipage/obsolete.html#the-xmp-element */
3047
3528
  xmp: {
3048
3529
  deprecated: {
3049
3530
  documentation: "Use `<pre>` or `<code>` and escape content using HTML entities instead.",