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.
@@ -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,12 +81,50 @@ 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: {
68
88
  enum: [/./u],
69
89
  list: true
70
90
  },
91
+ "aria-activedescendant": {
92
+ enum: [validId],
93
+ reference: "id"
94
+ },
95
+ "aria-controls": {
96
+ list: true,
97
+ enum: [validId],
98
+ reference: "id"
99
+ },
100
+ "aria-describedby": {
101
+ list: true,
102
+ enum: [validId],
103
+ reference: "id"
104
+ },
105
+ "aria-details": {
106
+ enum: [validId],
107
+ reference: "id"
108
+ },
109
+ "aria-errormessage": {
110
+ enum: [validId],
111
+ reference: "id"
112
+ },
113
+ "aria-flowto": {
114
+ list: true,
115
+ enum: [validId],
116
+ reference: "id"
117
+ },
118
+ "aria-labelledby": {
119
+ list: true,
120
+ enum: [validId],
121
+ reference: "id"
122
+ },
123
+ "aria-owns": {
124
+ list: true,
125
+ enum: [validId],
126
+ reference: "id"
127
+ },
71
128
  "aria-*": {},
72
129
  autocapitalize: {
73
130
  enum: ["off", "none", "on", "sentences", "words", "characters"]
@@ -161,9 +218,15 @@ var html5 = {
161
218
  enum: ["true", "false"]
162
219
  },
163
220
  "xml:*": {},
164
- "xmlns:*": {}
221
+ xmlns: {
222
+ enum: [validNonEmptyString]
223
+ },
224
+ "xmlns:*": {
225
+ enum: [validNonEmptyString]
226
+ }
165
227
  }
166
228
  },
229
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element */
167
230
  a: {
168
231
  flow: true,
169
232
  focusable(node) {
@@ -190,7 +253,7 @@ var html5 = {
190
253
  download: {
191
254
  allowed: allowedIfAttributeIsPresent("href"),
192
255
  omit: true,
193
- enum: ["/.+/"]
256
+ enum: [validNonEmptyString]
194
257
  },
195
258
  href: {
196
259
  enum: ["/.*/"]
@@ -282,14 +345,14 @@ var html5 = {
282
345
  return null;
283
346
  },
284
347
  list: true,
285
- enum: ["/.+/"]
348
+ enum: [validNonEmptyString]
286
349
  },
287
350
  shape: {
288
351
  deprecated: true
289
352
  },
290
353
  target: {
291
354
  allowed: allowedIfAttributeIsPresent("href"),
292
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
355
+ enum: [validBrowsingContextName, "_blank", "_self", "_parent", "_top"]
293
356
  },
294
357
  type: {
295
358
  allowed: allowedIfAttributeIsPresent("href")
@@ -313,6 +376,7 @@ var html5 = {
313
376
  }
314
377
  }
315
378
  },
379
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-abbr-element */
316
380
  abbr: {
317
381
  flow: true,
318
382
  phrasing: true,
@@ -328,6 +392,7 @@ var html5 = {
328
392
  source: "html5"
329
393
  }
330
394
  },
395
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-address-element */
331
396
  address: {
332
397
  flow: true,
333
398
  aria: {
@@ -336,6 +401,7 @@ var html5 = {
336
401
  permittedContent: ["@flow"],
337
402
  permittedDescendants: [{ exclude: ["address", "header", "footer", "@heading", "@sectioning"] }]
338
403
  },
404
+ /* https://html.spec.whatwg.org/multipage/obsolete.html#the-applet-element */
339
405
  applet: {
340
406
  deprecated: {
341
407
  source: "html5"
@@ -349,6 +415,7 @@ var html5 = {
349
415
  }
350
416
  }
351
417
  },
418
+ /* https://html.spec.whatwg.org/multipage/image-maps.html#the-area-element */
352
419
  area: {
353
420
  flow(node) {
354
421
  return Boolean(node.closest("map"));
@@ -475,7 +542,7 @@ var html5 = {
475
542
  },
476
543
  target: {
477
544
  allowed: allowedIfAttributeIsPresent("href"),
478
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
545
+ enum: [validBrowsingContextName, "_blank", "_self", "_parent", "_top"]
479
546
  }
480
547
  },
481
548
  aria: {
@@ -488,6 +555,7 @@ var html5 = {
488
555
  },
489
556
  requiredAncestors: ["map", "template"]
490
557
  },
558
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-article-element */
491
559
  article: {
492
560
  flow: true,
493
561
  sectioning: true,
@@ -497,6 +565,7 @@ var html5 = {
497
565
  implicitRole: "article"
498
566
  }
499
567
  },
568
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-aside-element */
500
569
  aside: {
501
570
  flow: true,
502
571
  sectioning: true,
@@ -506,6 +575,7 @@ var html5 = {
506
575
  implicitRole: "complementary"
507
576
  }
508
577
  },
578
+ /* https://html.spec.whatwg.org/multipage/media.html#the-audio-element */
509
579
  audio: {
510
580
  flow: true,
511
581
  focusable(node) {
@@ -518,6 +588,12 @@ var html5 = {
518
588
  },
519
589
  transparent: ["@flow"],
520
590
  attributes: {
591
+ autoplay: {
592
+ boolean: true
593
+ },
594
+ controls: {
595
+ boolean: true
596
+ },
521
597
  crossorigin: {
522
598
  omit: true,
523
599
  enum: ["anonymous", "use-credentials"]
@@ -525,15 +601,25 @@ var html5 = {
525
601
  itemprop: {
526
602
  allowed: allowedIfAttributeIsPresent("src")
527
603
  },
604
+ loop: {
605
+ boolean: true
606
+ },
607
+ muted: {
608
+ boolean: true
609
+ },
528
610
  preload: {
529
611
  omit: true,
530
612
  enum: ["none", "metadata", "auto"]
613
+ },
614
+ src: {
615
+ enum: [validNonEmptyString]
531
616
  }
532
617
  },
533
618
  permittedContent: ["@flow", "track", "source"],
534
619
  permittedDescendants: [{ exclude: ["audio", "video"] }],
535
620
  permittedOrder: ["source", "track", "@flow"]
536
621
  },
622
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-b-element */
537
623
  b: {
538
624
  flow: true,
539
625
  phrasing: true,
@@ -543,9 +629,14 @@ var html5 = {
543
629
  naming: "prohibited"
544
630
  }
545
631
  },
632
+ /* https://html.spec.whatwg.org/multipage/document-metadata.html#the-base-element */
546
633
  base: {
547
634
  metadata: true,
548
635
  void: true,
636
+ attributes: {
637
+ href: {},
638
+ target: {}
639
+ },
549
640
  permittedParent: ["head"],
550
641
  aria: {
551
642
  naming: "prohibited"
@@ -558,6 +649,7 @@ var html5 = {
558
649
  source: "html4"
559
650
  }
560
651
  },
652
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-bdi-element */
561
653
  bdi: {
562
654
  flow: true,
563
655
  phrasing: true,
@@ -567,6 +659,7 @@ var html5 = {
567
659
  naming: "prohibited"
568
660
  }
569
661
  },
662
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-bdo-element */
570
663
  bdo: {
571
664
  flow: true,
572
665
  phrasing: true,
@@ -596,14 +689,19 @@ var html5 = {
596
689
  source: "non-standard"
597
690
  }
598
691
  },
692
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-blockquote-element */
599
693
  blockquote: {
600
694
  flow: true,
601
695
  sectioning: true,
696
+ attributes: {
697
+ cite: {}
698
+ },
602
699
  aria: {
603
700
  implicitRole: "blockquote"
604
701
  },
605
702
  permittedContent: ["@flow"]
606
703
  },
704
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-body-element */
607
705
  body: {
608
706
  optionalEnd: true,
609
707
  permittedContent: ["@flow"],
@@ -651,6 +749,7 @@ var html5 = {
651
749
  naming: "prohibited"
652
750
  }
653
751
  },
752
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-br-element */
654
753
  br: {
655
754
  flow: true,
656
755
  phrasing: true,
@@ -664,6 +763,7 @@ var html5 = {
664
763
  naming: "prohibited"
665
764
  }
666
765
  },
766
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element */
667
767
  button: {
668
768
  flow: true,
669
769
  focusable: true,
@@ -682,6 +782,21 @@ var html5 = {
682
782
  autofocus: {
683
783
  boolean: true
684
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
+ },
685
800
  datafld: {
686
801
  deprecated: true
687
802
  },
@@ -694,6 +809,10 @@ var html5 = {
694
809
  disabled: {
695
810
  boolean: true
696
811
  },
812
+ form: {
813
+ enum: [validId],
814
+ reference: "id"
815
+ },
697
816
  formaction: {
698
817
  allowed: allowedIfAttributeHasValue("type", ["submit"], { defaultValue: "submit" })
699
818
  },
@@ -710,11 +829,22 @@ var html5 = {
710
829
  },
711
830
  formtarget: {
712
831
  allowed: allowedIfAttributeHasValue("type", ["submit"], { defaultValue: "submit" }),
713
- 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"]
714
843
  },
715
844
  type: {
716
845
  enum: ["submit", "reset", "button"]
717
- }
846
+ },
847
+ value: {}
718
848
  },
719
849
  aria: {
720
850
  implicitRole: "button"
@@ -723,12 +853,14 @@ var html5 = {
723
853
  permittedDescendants: [{ exclude: ["@interactive"] }],
724
854
  textContent: "accessible"
725
855
  },
856
+ /* https://html.spec.whatwg.org/multipage/canvas.html#the-canvas-element */
726
857
  canvas: {
727
858
  flow: true,
728
859
  phrasing: true,
729
860
  embedded: true,
730
861
  transparent: true
731
862
  },
863
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-caption-element */
732
864
  caption: {
733
865
  implicitClosed: ["colgroup", "thead", "tfoot", "tbody", "tr"],
734
866
  optionalEnd: true,
@@ -751,6 +883,7 @@ var html5 = {
751
883
  source: "html4"
752
884
  }
753
885
  },
886
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-cite-element */
754
887
  cite: {
755
888
  flow: true,
756
889
  phrasing: true,
@@ -759,6 +892,7 @@ var html5 = {
759
892
  naming: "prohibited"
760
893
  }
761
894
  },
895
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-code-element */
762
896
  code: {
763
897
  flow: true,
764
898
  phrasing: true,
@@ -768,6 +902,7 @@ var html5 = {
768
902
  naming: "prohibited"
769
903
  }
770
904
  },
905
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-col-element */
771
906
  col: {
772
907
  attributes: {
773
908
  align: {
@@ -780,7 +915,7 @@ var html5 = {
780
915
  deprecated: true
781
916
  },
782
917
  span: {
783
- enum: ["/\\d+/"]
918
+ enum: [validPositiveInteger]
784
919
  },
785
920
  valign: {
786
921
  deprecated: true
@@ -794,11 +929,12 @@ var html5 = {
794
929
  naming: "prohibited"
795
930
  }
796
931
  },
932
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-colgroup-element */
797
933
  colgroup: {
798
934
  implicitClosed: ["colgroup", "caption", "thead", "tbody", "tfoot", "tr"],
799
935
  attributes: {
800
936
  span: {
801
- enum: ["/\\d+/"]
937
+ enum: [validPositiveInteger]
802
938
  }
803
939
  },
804
940
  permittedContent: ["col", "template"],
@@ -806,15 +942,20 @@ var html5 = {
806
942
  naming: "prohibited"
807
943
  }
808
944
  },
945
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-data-element */
809
946
  data: {
810
947
  flow: true,
811
948
  phrasing: true,
949
+ attributes: {
950
+ value: {}
951
+ },
812
952
  permittedContent: ["@phrasing"],
813
953
  aria: {
814
954
  implicitRole: "generic",
815
955
  naming: "prohibited"
816
956
  }
817
957
  },
958
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-datalist-element */
818
959
  datalist: {
819
960
  flow: true,
820
961
  phrasing: true,
@@ -824,25 +965,33 @@ var html5 = {
824
965
  },
825
966
  permittedContent: ["@phrasing", "option"]
826
967
  },
968
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-dd-element */
827
969
  dd: {
828
970
  implicitClosed: ["dd", "dt"],
829
971
  permittedContent: ["@flow"],
830
972
  requiredAncestors: ["dl > dd", "dl > div > dd", "template > dd", "template > div > dd"]
831
973
  },
974
+ /* https://html.spec.whatwg.org/multipage/edits.html#the-del-element */
832
975
  del: {
833
976
  flow: true,
834
977
  phrasing: true,
835
978
  transparent: true,
979
+ attributes: {
980
+ cite: {},
981
+ datetime: {}
982
+ },
836
983
  aria: {
837
984
  implicitRole: "deletion",
838
985
  naming: "prohibited"
839
986
  }
840
987
  },
988
+ /* https://html.spec.whatwg.org/multipage/interactive-elements.html#the-details-element */
841
989
  details: {
842
990
  flow: true,
843
991
  sectioning: true,
844
992
  interactive: true,
845
993
  attributes: {
994
+ name: {},
846
995
  open: {
847
996
  boolean: true
848
997
  }
@@ -854,6 +1003,7 @@ var html5 = {
854
1003
  permittedOrder: ["summary", "@flow"],
855
1004
  requiredContent: ["summary"]
856
1005
  },
1006
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-dfn-element */
857
1007
  dfn: {
858
1008
  flow: true,
859
1009
  phrasing: true,
@@ -863,10 +1013,15 @@ var html5 = {
863
1013
  permittedContent: ["@phrasing"],
864
1014
  permittedDescendants: [{ exclude: ["dfn"] }]
865
1015
  },
1016
+ /* https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element */
866
1017
  dialog: {
867
1018
  flow: true,
868
1019
  permittedContent: ["@flow"],
869
1020
  attributes: {
1021
+ closedby: {
1022
+ omit: true,
1023
+ enum: ["any", "closerequest", "none"]
1024
+ },
870
1025
  open: {
871
1026
  boolean: true
872
1027
  }
@@ -881,6 +1036,7 @@ var html5 = {
881
1036
  source: "html4"
882
1037
  }
883
1038
  },
1039
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-div-element */
884
1040
  div: {
885
1041
  flow: true,
886
1042
  permittedContent: ["@flow", "dt", "dd"],
@@ -903,6 +1059,7 @@ var html5 = {
903
1059
  naming: "prohibited"
904
1060
  }
905
1061
  },
1062
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element */
906
1063
  dl: {
907
1064
  flow: true,
908
1065
  permittedContent: ["@script", "dt", "dd", "div"],
@@ -912,12 +1069,14 @@ var html5 = {
912
1069
  }
913
1070
  }
914
1071
  },
1072
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-dt-element */
915
1073
  dt: {
916
1074
  implicitClosed: ["dd", "dt"],
917
1075
  permittedContent: ["@flow"],
918
1076
  permittedDescendants: [{ exclude: ["header", "footer", "@sectioning", "@heading"] }],
919
1077
  requiredAncestors: ["dl > dt", "dl > div > dt", "template > dt", "template > div > dt"]
920
1078
  },
1079
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-em-element */
921
1080
  em: {
922
1081
  flow: true,
923
1082
  phrasing: true,
@@ -927,6 +1086,7 @@ var html5 = {
927
1086
  naming: "prohibited"
928
1087
  }
929
1088
  },
1089
+ /* https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-embed-element */
930
1090
  embed: {
931
1091
  flow: true,
932
1092
  phrasing: true,
@@ -935,20 +1095,21 @@ var html5 = {
935
1095
  void: true,
936
1096
  attributes: {
937
1097
  height: {
938
- enum: ["/\\d+/"]
1098
+ enum: [validPositiveInteger]
939
1099
  },
940
1100
  src: {
941
1101
  required: true,
942
- enum: ["/.+/"]
1102
+ enum: [validNonEmptyString]
943
1103
  },
944
1104
  title: {
945
1105
  required: true
946
1106
  },
947
1107
  width: {
948
- enum: ["/\\d+/"]
1108
+ enum: [validPositiveInteger]
949
1109
  }
950
1110
  }
951
1111
  },
1112
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-fieldset-element */
952
1113
  fieldset: {
953
1114
  flow: true,
954
1115
  formAssociated: {
@@ -961,6 +1122,13 @@ var html5 = {
961
1122
  },
962
1123
  disabled: {
963
1124
  boolean: true
1125
+ },
1126
+ form: {
1127
+ enum: [validId],
1128
+ reference: "id"
1129
+ },
1130
+ name: {
1131
+ enum: [validNonEmptyString]
964
1132
  }
965
1133
  },
966
1134
  aria: {
@@ -969,12 +1137,14 @@ var html5 = {
969
1137
  permittedContent: ["@flow", "legend?"],
970
1138
  permittedOrder: ["legend", "@flow"]
971
1139
  },
1140
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-figcaption-element */
972
1141
  figcaption: {
973
1142
  permittedContent: ["@flow"],
974
1143
  aria: {
975
1144
  naming: "prohibited"
976
1145
  }
977
1146
  },
1147
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-figure-element */
978
1148
  figure: {
979
1149
  flow: true,
980
1150
  aria: {
@@ -990,6 +1160,7 @@ var html5 = {
990
1160
  source: "html4"
991
1161
  }
992
1162
  },
1163
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-footer-element */
993
1164
  footer: {
994
1165
  flow: true,
995
1166
  aria: {
@@ -1011,22 +1182,28 @@ var html5 = {
1011
1182
  permittedContent: ["@flow"],
1012
1183
  permittedDescendants: [{ exclude: ["header", "footer", "main"] }]
1013
1184
  },
1185
+ /* https://html.spec.whatwg.org/multipage/forms.html#the-form-element */
1014
1186
  form: {
1015
1187
  flow: true,
1016
1188
  form: true,
1017
1189
  attributes: {
1018
- action: {
1019
- enum: [/^\s*\S+\s*$/]
1020
- },
1021
1190
  accept: {
1022
1191
  deprecated: true
1023
1192
  },
1193
+ "accept-charset": {},
1194
+ action: {
1195
+ enum: [/^\s*\S+\s*$/]
1196
+ },
1024
1197
  autocomplete: {
1025
1198
  enum: ["on", "off"]
1026
1199
  },
1200
+ enctype: {
1201
+ enum: ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]
1202
+ },
1027
1203
  method: {
1028
1204
  enum: ["get", "post", "dialog"]
1029
1205
  },
1206
+ name: {},
1030
1207
  novalidate: {
1031
1208
  boolean: true
1032
1209
  },
@@ -1064,10 +1241,10 @@ var html5 = {
1064
1241
  return null;
1065
1242
  },
1066
1243
  list: true,
1067
- enum: ["/.+/"]
1244
+ enum: [validNonEmptyString]
1068
1245
  },
1069
1246
  target: {
1070
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
1247
+ enum: [validBrowsingContextName, "_blank", "_self", "_parent", "_top"]
1071
1248
  }
1072
1249
  },
1073
1250
  aria: {
@@ -1099,6 +1276,7 @@ var html5 = {
1099
1276
  source: "html5"
1100
1277
  }
1101
1278
  },
1279
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1102
1280
  h1: {
1103
1281
  flow: true,
1104
1282
  heading: true,
@@ -1112,6 +1290,7 @@ var html5 = {
1112
1290
  implicitRole: "heading"
1113
1291
  }
1114
1292
  },
1293
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1115
1294
  h2: {
1116
1295
  flow: true,
1117
1296
  heading: true,
@@ -1125,6 +1304,7 @@ var html5 = {
1125
1304
  implicitRole: "heading"
1126
1305
  }
1127
1306
  },
1307
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1128
1308
  h3: {
1129
1309
  flow: true,
1130
1310
  heading: true,
@@ -1138,6 +1318,7 @@ var html5 = {
1138
1318
  implicitRole: "heading"
1139
1319
  }
1140
1320
  },
1321
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1141
1322
  h4: {
1142
1323
  flow: true,
1143
1324
  heading: true,
@@ -1151,6 +1332,7 @@ var html5 = {
1151
1332
  implicitRole: "heading"
1152
1333
  }
1153
1334
  },
1335
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1154
1336
  h5: {
1155
1337
  flow: true,
1156
1338
  heading: true,
@@ -1164,6 +1346,7 @@ var html5 = {
1164
1346
  implicitRole: "heading"
1165
1347
  }
1166
1348
  },
1349
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements */
1167
1350
  h6: {
1168
1351
  flow: true,
1169
1352
  heading: true,
@@ -1177,6 +1360,7 @@ var html5 = {
1177
1360
  implicitRole: "heading"
1178
1361
  }
1179
1362
  },
1363
+ /* https://html.spec.whatwg.org/multipage/document-metadata.html#the-head-element */
1180
1364
  head: {
1181
1365
  implicitClosed: ["body", "@flow-not-meta"],
1182
1366
  optionalEnd: true,
@@ -1192,6 +1376,7 @@ var html5 = {
1192
1376
  naming: "prohibited"
1193
1377
  }
1194
1378
  },
1379
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-header-element */
1195
1380
  header: {
1196
1381
  flow: true,
1197
1382
  aria: {
@@ -1213,6 +1398,7 @@ var html5 = {
1213
1398
  permittedContent: ["@flow"],
1214
1399
  permittedDescendants: [{ exclude: ["header", "footer", "main"] }]
1215
1400
  },
1401
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-hgroup-element */
1216
1402
  hgroup: {
1217
1403
  flow: true,
1218
1404
  heading: true,
@@ -1223,6 +1409,7 @@ var html5 = {
1223
1409
  implicitRole: "group"
1224
1410
  }
1225
1411
  },
1412
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-hr-element */
1226
1413
  hr: {
1227
1414
  flow: true,
1228
1415
  void: true,
@@ -1247,6 +1434,7 @@ var html5 = {
1247
1434
  implicitRole: "separator"
1248
1435
  }
1249
1436
  },
1437
+ /* https://html.spec.whatwg.org/multipage/semantics.html#the-html-element */
1250
1438
  html: {
1251
1439
  implicitOpen: [
1252
1440
  { for: ["@meta"], open: "head" },
@@ -1269,6 +1457,7 @@ var html5 = {
1269
1457
  naming: "prohibited"
1270
1458
  }
1271
1459
  },
1460
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-i-element */
1272
1461
  i: {
1273
1462
  flow: true,
1274
1463
  phrasing: true,
@@ -1278,6 +1467,7 @@ var html5 = {
1278
1467
  naming: "prohibited"
1279
1468
  }
1280
1469
  },
1470
+ /* https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element */
1281
1471
  iframe: {
1282
1472
  flow: true,
1283
1473
  phrasing: true,
@@ -1300,7 +1490,7 @@ var html5 = {
1300
1490
  deprecated: true
1301
1491
  },
1302
1492
  height: {
1303
- enum: ["/\\d+/"]
1493
+ enum: [validPositiveInteger]
1304
1494
  },
1305
1495
  hspace: {
1306
1496
  deprecated: true
@@ -1318,7 +1508,7 @@ var html5 = {
1318
1508
  deprecated: true
1319
1509
  },
1320
1510
  src: {
1321
- enum: ["/.+/"]
1511
+ enum: [validNonEmptyString]
1322
1512
  },
1323
1513
  title: {
1324
1514
  required: true
@@ -1327,11 +1517,12 @@ var html5 = {
1327
1517
  deprecated: true
1328
1518
  },
1329
1519
  width: {
1330
- enum: ["/\\d+/"]
1520
+ enum: [validPositiveInteger]
1331
1521
  }
1332
1522
  },
1333
1523
  permittedContent: []
1334
1524
  },
1525
+ /* https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element */
1335
1526
  img: {
1336
1527
  flow: true,
1337
1528
  phrasing: true,
@@ -1344,6 +1535,7 @@ var html5 = {
1344
1535
  align: {
1345
1536
  deprecated: true
1346
1537
  },
1538
+ alt: {},
1347
1539
  border: {
1348
1540
  deprecated: true
1349
1541
  },
@@ -1360,8 +1552,12 @@ var html5 = {
1360
1552
  decoding: {
1361
1553
  enum: ["sync", "async", "auto"]
1362
1554
  },
1555
+ fetchpriority: {
1556
+ omit: true,
1557
+ enum: ["high", "low", "auto"]
1558
+ },
1363
1559
  height: {
1364
- enum: ["/\\d+/"]
1560
+ enum: [validPositiveInteger]
1365
1561
  },
1366
1562
  hspace: {
1367
1563
  deprecated: true
@@ -1369,6 +1565,10 @@ var html5 = {
1369
1565
  ismap: {
1370
1566
  boolean: true
1371
1567
  },
1568
+ loading: {
1569
+ omit: true,
1570
+ enum: ["lazy", "eager"]
1571
+ },
1372
1572
  lowsrc: {
1373
1573
  deprecated: true
1374
1574
  },
@@ -1378,18 +1578,20 @@ var html5 = {
1378
1578
  referrerpolicy: {
1379
1579
  enum: ReferrerPolicy
1380
1580
  },
1581
+ sizes: {},
1381
1582
  src: {
1382
1583
  required: true,
1383
- enum: ["/.+/"]
1584
+ enum: [validNonEmptyString]
1384
1585
  },
1385
1586
  srcset: {
1386
1587
  enum: ["/[^]+/"]
1387
1588
  },
1589
+ usemap: {},
1388
1590
  vspace: {
1389
1591
  deprecated: true
1390
1592
  },
1391
1593
  width: {
1392
- enum: ["/\\d+/"]
1594
+ enum: [validPositiveInteger]
1393
1595
  }
1394
1596
  },
1395
1597
  aria: {
@@ -1417,6 +1619,7 @@ var html5 = {
1417
1619
  }
1418
1620
  }
1419
1621
  },
1622
+ /* https://html.spec.whatwg.org/multipage/input.html#the-input-element */
1420
1623
  input: {
1421
1624
  flow: true,
1422
1625
  focusable(node) {
@@ -1439,9 +1642,18 @@ var html5 = {
1439
1642
  return type === "submit" || type === "image";
1440
1643
  },
1441
1644
  attributes: {
1645
+ accept: {},
1442
1646
  align: {
1443
1647
  deprecated: true
1444
1648
  },
1649
+ alpha: {
1650
+ boolean: true
1651
+ },
1652
+ alt: {},
1653
+ autocapitalize: {
1654
+ enum: ["off", "none", "on", "sentences", "words", "characters"]
1655
+ },
1656
+ autocomplete: {},
1445
1657
  autofocus: {
1446
1658
  boolean: true
1447
1659
  },
@@ -1452,6 +1664,9 @@ var html5 = {
1452
1664
  checked: {
1453
1665
  boolean: true
1454
1666
  },
1667
+ colorspace: {
1668
+ enum: ["limited-srgb", "display-p3"]
1669
+ },
1455
1670
  datafld: {
1456
1671
  deprecated: true
1457
1672
  },
@@ -1461,9 +1676,14 @@ var html5 = {
1461
1676
  datasrc: {
1462
1677
  deprecated: true
1463
1678
  },
1679
+ dirname: {},
1464
1680
  disabled: {
1465
1681
  boolean: true
1466
1682
  },
1683
+ form: {
1684
+ enum: [validId],
1685
+ reference: "id"
1686
+ },
1467
1687
  formaction: {
1468
1688
  allowed: allowedIfAttributeHasValue("type", ["submit", "image"], {
1469
1689
  defaultValue: "submit"
@@ -1490,7 +1710,10 @@ var html5 = {
1490
1710
  allowed: allowedIfAttributeHasValue("type", ["submit", "image"], {
1491
1711
  defaultValue: "submit"
1492
1712
  }),
1493
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
1713
+ enum: [validBrowsingContextName, "_blank", "_self", "_parent", "_top"]
1714
+ },
1715
+ height: {
1716
+ enum: [validPositiveInteger]
1494
1717
  },
1495
1718
  hspace: {
1496
1719
  deprecated: true
@@ -1501,15 +1724,50 @@ var html5 = {
1501
1724
  ismap: {
1502
1725
  deprecated: true
1503
1726
  },
1727
+ list: {
1728
+ enum: [validId],
1729
+ reference: "id"
1730
+ },
1731
+ max: {
1732
+ enum: [validNonEmptyString]
1733
+ },
1734
+ maxlength: {
1735
+ enum: [validPositiveInteger]
1736
+ },
1737
+ min: {
1738
+ enum: [validNonEmptyString]
1739
+ },
1740
+ minlength: {
1741
+ enum: [validPositiveInteger]
1742
+ },
1504
1743
  multiple: {
1505
1744
  boolean: true
1506
1745
  },
1746
+ name: {
1747
+ enum: [validNonEmptyString]
1748
+ },
1749
+ pattern: {},
1750
+ placeholder: {},
1751
+ popovertarget: {
1752
+ enum: [validId],
1753
+ reference: "id"
1754
+ },
1755
+ popovertargetaction: {
1756
+ enum: ["toggle", "show", "hide"]
1757
+ },
1507
1758
  readonly: {
1508
1759
  boolean: true
1509
1760
  },
1510
1761
  required: {
1511
1762
  boolean: true
1512
1763
  },
1764
+ size: {
1765
+ enum: [validPositiveInteger]
1766
+ },
1767
+ src: {
1768
+ enum: [validNonEmptyString]
1769
+ },
1770
+ step: {},
1513
1771
  type: {
1514
1772
  enum: [
1515
1773
  "button",
@@ -1539,8 +1797,12 @@ var html5 = {
1539
1797
  usemap: {
1540
1798
  deprecated: true
1541
1799
  },
1800
+ value: {},
1542
1801
  vspace: {
1543
1802
  deprecated: true
1803
+ },
1804
+ width: {
1805
+ enum: [validPositiveInteger]
1544
1806
  }
1545
1807
  },
1546
1808
  aria: {
@@ -1605,20 +1867,27 @@ var html5 = {
1605
1867
  }
1606
1868
  }
1607
1869
  },
1870
+ /* https://html.spec.whatwg.org/multipage/edits.html#the-ins-element */
1608
1871
  ins: {
1609
1872
  flow: true,
1610
1873
  phrasing: true,
1611
1874
  transparent: true,
1875
+ attributes: {
1876
+ cite: {},
1877
+ datetime: {}
1878
+ },
1612
1879
  aria: {
1613
1880
  implicitRole: "insertion",
1614
1881
  naming: "prohibited"
1615
1882
  }
1616
1883
  },
1884
+ /* https://html.spec.whatwg.org/multipage/obsolete.html#isindex */
1617
1885
  isindex: {
1618
1886
  deprecated: {
1619
1887
  source: "html4"
1620
1888
  }
1621
1889
  },
1890
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-kbd-element */
1622
1891
  kbd: {
1623
1892
  flow: true,
1624
1893
  phrasing: true,
@@ -1635,6 +1904,7 @@ var html5 = {
1635
1904
  labelable: true,
1636
1905
  deprecated: true
1637
1906
  },
1907
+ /* https://html.spec.whatwg.org/multipage/forms.html#the-label-element */
1638
1908
  label: {
1639
1909
  flow: true,
1640
1910
  phrasing: true,
@@ -1652,13 +1922,15 @@ var html5 = {
1652
1922
  deprecated: true
1653
1923
  },
1654
1924
  for: {
1655
- enum: [validId]
1925
+ enum: [validId],
1926
+ reference: "id"
1656
1927
  }
1657
1928
  },
1658
1929
  aria: {
1659
1930
  naming: "prohibited"
1660
1931
  }
1661
1932
  },
1933
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-legend-element */
1662
1934
  legend: {
1663
1935
  permittedContent: ["@phrasing", "@heading"],
1664
1936
  attributes: {
@@ -1679,6 +1951,7 @@ var html5 = {
1679
1951
  naming: "prohibited"
1680
1952
  }
1681
1953
  },
1954
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-li-element */
1682
1955
  li: {
1683
1956
  implicitClosed: ["li"],
1684
1957
  permittedContent: ["@flow"],
@@ -1686,6 +1959,9 @@ var html5 = {
1686
1959
  attributes: {
1687
1960
  type: {
1688
1961
  deprecated: true
1962
+ },
1963
+ value: {
1964
+ enum: ["/-?\\d+/"]
1689
1965
  }
1690
1966
  },
1691
1967
  aria: {
@@ -1694,6 +1970,7 @@ var html5 = {
1694
1970
  }
1695
1971
  }
1696
1972
  },
1973
+ /* https://html.spec.whatwg.org/multipage/document-metadata.html#the-link-element */
1697
1974
  link: {
1698
1975
  metadata: true,
1699
1976
  flow(node) {
@@ -1754,7 +2031,7 @@ var html5 = {
1754
2031
  }
1755
2032
  return `{{ tagName }} is missing required "href" or "imagesrcset" attribute`;
1756
2033
  },
1757
- enum: ["/.+/"]
2034
+ enum: [validNonEmptyString]
1758
2035
  },
1759
2036
  imagesrcset: {
1760
2037
  allowed(node) {
@@ -1791,7 +2068,7 @@ var html5 = {
1791
2068
  },
1792
2069
  integrity: {
1793
2070
  allowed: allowedIfAttributeHasValue("rel", ["stylesheet", "preload", "modulepreload"]),
1794
- enum: ["/.+/"]
2071
+ enum: [validNonEmptyString]
1795
2072
  },
1796
2073
  methods: {
1797
2074
  deprecated: true
@@ -1828,7 +2105,7 @@ var html5 = {
1828
2105
  return null;
1829
2106
  },
1830
2107
  list: true,
1831
- enum: ["/.+/"]
2108
+ enum: [validNonEmptyString]
1832
2109
  },
1833
2110
  target: {
1834
2111
  deprecated: true
@@ -1846,12 +2123,14 @@ var html5 = {
1846
2123
  source: "html32"
1847
2124
  }
1848
2125
  },
2126
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-main-element */
1849
2127
  main: {
1850
2128
  flow: true,
1851
2129
  aria: {
1852
2130
  implicitRole: "main"
1853
2131
  }
1854
2132
  },
2133
+ /* https://html.spec.whatwg.org/multipage/image-maps.html#the-map-element */
1855
2134
  map: {
1856
2135
  flow: true,
1857
2136
  phrasing: true,
@@ -1866,6 +2145,7 @@ var html5 = {
1866
2145
  naming: "prohibited"
1867
2146
  }
1868
2147
  },
2148
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-mark-element */
1869
2149
  mark: {
1870
2150
  flow: true,
1871
2151
  phrasing: true,
@@ -1891,6 +2171,7 @@ var html5 = {
1891
2171
  }
1892
2172
  }
1893
2173
  },
2174
+ /* https://html.spec.whatwg.org/multipage/embedded-content.html#mathml */
1894
2175
  math: {
1895
2176
  flow: true,
1896
2177
  foreign: true,
@@ -1923,6 +2204,7 @@ var html5 = {
1923
2204
  implicitRole: "math"
1924
2205
  }
1925
2206
  },
2207
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-menu-element */
1926
2208
  menu: {
1927
2209
  flow: true,
1928
2210
  aria: {
@@ -1930,6 +2212,7 @@ var html5 = {
1930
2212
  },
1931
2213
  permittedContent: ["@script", "li"]
1932
2214
  },
2215
+ /* https://html.spec.whatwg.org/multipage/semantics.html#the-meta-element */
1933
2216
  meta: {
1934
2217
  flow(node) {
1935
2218
  return node.hasAttribute("itemprop");
@@ -1963,10 +2246,31 @@ var html5 = {
1963
2246
  naming: "prohibited"
1964
2247
  }
1965
2248
  },
2249
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-meter-element */
1966
2250
  meter: {
1967
2251
  flow: true,
1968
2252
  phrasing: true,
1969
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
+ },
1970
2274
  aria: {
1971
2275
  implicitRole: "meter"
1972
2276
  },
@@ -1980,6 +2284,7 @@ var html5 = {
1980
2284
  source: "html5"
1981
2285
  }
1982
2286
  },
2287
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-nav-element */
1983
2288
  nav: {
1984
2289
  flow: true,
1985
2290
  sectioning: true,
@@ -2011,6 +2316,7 @@ var html5 = {
2011
2316
  source: "html5"
2012
2317
  }
2013
2318
  },
2319
+ /* https://html.spec.whatwg.org/multipage/scripting.html#the-noscript-element */
2014
2320
  noscript: {
2015
2321
  metadata: true,
2016
2322
  flow: true,
@@ -2021,6 +2327,7 @@ var html5 = {
2021
2327
  naming: "prohibited"
2022
2328
  }
2023
2329
  },
2330
+ /* https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element */
2024
2331
  object: {
2025
2332
  flow: true,
2026
2333
  phrasing: true,
@@ -2060,7 +2367,7 @@ var html5 = {
2060
2367
  deprecated: true
2061
2368
  },
2062
2369
  data: {
2063
- enum: ["/.+/"],
2370
+ enum: [validNonEmptyString],
2064
2371
  required: true
2065
2372
  },
2066
2373
  datafld: {
@@ -2076,13 +2383,13 @@ var html5 = {
2076
2383
  deprecated: true
2077
2384
  },
2078
2385
  height: {
2079
- enum: ["/\\d+/"]
2386
+ enum: [validPositiveInteger]
2080
2387
  },
2081
2388
  hspace: {
2082
2389
  deprecated: true
2083
2390
  },
2084
2391
  name: {
2085
- enum: ["/[^_].*/"]
2392
+ enum: [validBrowsingContextName]
2086
2393
  },
2087
2394
  standby: {
2088
2395
  deprecated: true
@@ -2091,12 +2398,13 @@ var html5 = {
2091
2398
  deprecated: true
2092
2399
  },
2093
2400
  width: {
2094
- enum: ["/\\d+/"]
2401
+ enum: [validPositiveInteger]
2095
2402
  }
2096
2403
  },
2097
2404
  permittedContent: ["param", "@flow"],
2098
2405
  permittedOrder: ["param", "@flow"]
2099
2406
  },
2407
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-ol-element */
2100
2408
  ol: {
2101
2409
  flow: true,
2102
2410
  attributes: {
@@ -2106,6 +2414,9 @@ var html5 = {
2106
2414
  reversed: {
2107
2415
  boolean: true
2108
2416
  },
2417
+ start: {
2418
+ enum: [validPositiveInteger]
2419
+ },
2109
2420
  type: {
2110
2421
  enum: ["a", "A", "i", "I", "1"]
2111
2422
  }
@@ -2115,18 +2426,21 @@ var html5 = {
2115
2426
  },
2116
2427
  permittedContent: ["@script", "li"]
2117
2428
  },
2429
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-optgroup-element */
2118
2430
  optgroup: {
2119
2431
  implicitClosed: ["optgroup"],
2120
2432
  attributes: {
2121
2433
  disabled: {
2122
2434
  boolean: true
2123
- }
2435
+ },
2436
+ label: {}
2124
2437
  },
2125
2438
  aria: {
2126
2439
  implicitRole: "group"
2127
2440
  },
2128
2441
  permittedContent: ["@script", "option"]
2129
2442
  },
2443
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-option-element */
2130
2444
  option: {
2131
2445
  implicitClosed: ["option"],
2132
2446
  attributes: {
@@ -2139,6 +2453,7 @@ var html5 = {
2139
2453
  disabled: {
2140
2454
  boolean: true
2141
2455
  },
2456
+ label: {},
2142
2457
  name: {
2143
2458
  deprecated: true
2144
2459
  },
@@ -2153,6 +2468,7 @@ var html5 = {
2153
2468
  permittedContent: ["@phrasing", "div"],
2154
2469
  permittedDescendants: [{ exclude: ["@interactive", "datalist", "object"] }]
2155
2470
  },
2471
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-output-element */
2156
2472
  output: {
2157
2473
  flow: true,
2158
2474
  phrasing: true,
@@ -2161,11 +2477,26 @@ var html5 = {
2161
2477
  listed: true
2162
2478
  },
2163
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
+ },
2164
2494
  aria: {
2165
2495
  implicitRole: "status"
2166
2496
  },
2167
2497
  permittedContent: ["@phrasing"]
2168
2498
  },
2499
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-p-element */
2169
2500
  p: {
2170
2501
  flow: true,
2171
2502
  implicitClosed: [
@@ -2233,6 +2564,7 @@ var html5 = {
2233
2564
  naming: "prohibited"
2234
2565
  }
2235
2566
  },
2567
+ /* https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element */
2236
2568
  picture: {
2237
2569
  flow: true,
2238
2570
  phrasing: true,
@@ -2250,6 +2582,7 @@ var html5 = {
2250
2582
  source: "html2"
2251
2583
  }
2252
2584
  },
2585
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element */
2253
2586
  pre: {
2254
2587
  flow: true,
2255
2588
  permittedContent: ["@phrasing"],
@@ -2263,19 +2596,32 @@ var html5 = {
2263
2596
  naming: "prohibited"
2264
2597
  }
2265
2598
  },
2599
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-progress-element */
2266
2600
  progress: {
2267
2601
  flow: true,
2268
2602
  phrasing: true,
2269
2603
  labelable: true,
2604
+ attributes: {
2605
+ max: {
2606
+ enum: [validFloatingPoint]
2607
+ },
2608
+ value: {
2609
+ enum: [validFloatingPoint]
2610
+ }
2611
+ },
2270
2612
  aria: {
2271
2613
  implicitRole: "progressbar"
2272
2614
  },
2273
2615
  permittedContent: ["@phrasing"],
2274
2616
  permittedDescendants: [{ exclude: "progress" }]
2275
2617
  },
2618
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-q-element */
2276
2619
  q: {
2277
2620
  flow: true,
2278
2621
  phrasing: true,
2622
+ attributes: {
2623
+ cite: {}
2624
+ },
2279
2625
  permittedContent: ["@phrasing"],
2280
2626
  aria: {
2281
2627
  implicitRole: "generic",
@@ -2286,6 +2632,7 @@ var html5 = {
2286
2632
  implicitClosed: ["rb", "rt", "rtc", "rp"],
2287
2633
  permittedContent: ["@phrasing"]
2288
2634
  },
2635
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-rp-element */
2289
2636
  rp: {
2290
2637
  implicitClosed: ["rb", "rt", "rtc", "rp"],
2291
2638
  permittedContent: ["@phrasing"],
@@ -2293,6 +2640,7 @@ var html5 = {
2293
2640
  naming: "prohibited"
2294
2641
  }
2295
2642
  },
2643
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-rt-element */
2296
2644
  rt: {
2297
2645
  implicitClosed: ["rb", "rt", "rtc", "rp"],
2298
2646
  permittedContent: ["@phrasing"],
@@ -2304,11 +2652,13 @@ var html5 = {
2304
2652
  implicitClosed: ["rb", "rtc", "rp"],
2305
2653
  permittedContent: ["@phrasing", "rt"]
2306
2654
  },
2655
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-ruby-element */
2307
2656
  ruby: {
2308
2657
  flow: true,
2309
2658
  phrasing: true,
2310
2659
  permittedContent: ["@phrasing", "rb", "rp", "rt", "rtc"]
2311
2660
  },
2661
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-s-element */
2312
2662
  s: {
2313
2663
  flow: true,
2314
2664
  phrasing: true,
@@ -2318,6 +2668,7 @@ var html5 = {
2318
2668
  naming: "prohibited"
2319
2669
  }
2320
2670
  },
2671
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-samp-element */
2321
2672
  samp: {
2322
2673
  flow: true,
2323
2674
  phrasing: true,
@@ -2327,6 +2678,7 @@ var html5 = {
2327
2678
  naming: "prohibited"
2328
2679
  }
2329
2680
  },
2681
+ /* https://html.spec.whatwg.org/multipage/scripting.html#the-script-element */
2330
2682
  script: {
2331
2683
  metadata: true,
2332
2684
  flow: true,
@@ -2336,6 +2688,10 @@ var html5 = {
2336
2688
  async: {
2337
2689
  boolean: true
2338
2690
  },
2691
+ blocking: {
2692
+ list: true,
2693
+ enum: ["render"]
2694
+ },
2339
2695
  crossorigin: {
2340
2696
  omit: true,
2341
2697
  enum: ["anonymous", "use-credentials"]
@@ -2346,12 +2702,15 @@ var html5 = {
2346
2702
  event: {
2347
2703
  deprecated: true
2348
2704
  },
2705
+ fetchpriority: {
2706
+ enum: ["high", "low", "auto"]
2707
+ },
2349
2708
  for: {
2350
2709
  deprecated: true
2351
2710
  },
2352
2711
  integrity: {
2353
2712
  allowed: allowedIfAttributeIsPresent("src"),
2354
- enum: ["/.+/"]
2713
+ enum: [validNonEmptyString]
2355
2714
  },
2356
2715
  language: {
2357
2716
  deprecated: true
@@ -2363,19 +2722,22 @@ var html5 = {
2363
2722
  enum: ReferrerPolicy
2364
2723
  },
2365
2724
  src: {
2366
- enum: ["/.+/"]
2367
- }
2725
+ enum: [validNonEmptyString]
2726
+ },
2727
+ type: {}
2368
2728
  },
2369
2729
  aria: {
2370
2730
  naming: "prohibited"
2371
2731
  }
2372
2732
  },
2733
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-search-element */
2373
2734
  search: {
2374
2735
  flow: true,
2375
2736
  aria: {
2376
2737
  implicitRole: "search"
2377
2738
  }
2378
2739
  },
2740
+ /* https://html.spec.whatwg.org/multipage/sections.html#the-section-element */
2379
2741
  section: {
2380
2742
  flow: true,
2381
2743
  sectioning: true,
@@ -2387,6 +2749,7 @@ var html5 = {
2387
2749
  },
2388
2750
  permittedContent: ["@flow"]
2389
2751
  },
2752
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element */
2390
2753
  select: {
2391
2754
  flow: true,
2392
2755
  focusable: true,
@@ -2398,20 +2761,28 @@ var html5 = {
2398
2761
  },
2399
2762
  labelable: true,
2400
2763
  attributes: {
2764
+ autocomplete: {},
2401
2765
  autofocus: {
2402
2766
  boolean: true
2403
2767
  },
2404
2768
  disabled: {
2405
2769
  boolean: true
2406
2770
  },
2771
+ form: {
2772
+ enum: [validId],
2773
+ reference: "id"
2774
+ },
2407
2775
  multiple: {
2408
2776
  boolean: true
2409
2777
  },
2778
+ name: {
2779
+ enum: [validNonEmptyString]
2780
+ },
2410
2781
  required: {
2411
2782
  boolean: true
2412
2783
  },
2413
2784
  size: {
2414
- enum: ["/\\d+/"]
2785
+ enum: [validPositiveInteger]
2415
2786
  }
2416
2787
  },
2417
2788
  aria: {
@@ -2450,6 +2821,7 @@ var html5 = {
2450
2821
  ],
2451
2822
  permittedOrder: ["button", "option, optgroup, hr"]
2452
2823
  },
2824
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-selectedcontent-element */
2453
2825
  selectedcontent: {
2454
2826
  phrasing: true,
2455
2827
  permittedContent: [],
@@ -2460,6 +2832,7 @@ var html5 = {
2460
2832
  naming: "prohibited"
2461
2833
  }
2462
2834
  },
2835
+ /* https://html.spec.whatwg.org/multipage/scripting.html#the-slot-element */
2463
2836
  slot: {
2464
2837
  flow: true,
2465
2838
  phrasing: true,
@@ -2471,6 +2844,7 @@ var html5 = {
2471
2844
  name: {}
2472
2845
  }
2473
2846
  },
2847
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-small-element */
2474
2848
  small: {
2475
2849
  flow: true,
2476
2850
  phrasing: true,
@@ -2480,6 +2854,7 @@ var html5 = {
2480
2854
  naming: "prohibited"
2481
2855
  }
2482
2856
  },
2857
+ /* https://html.spec.whatwg.org/multipage/embedded-content.html#the-source-element */
2483
2858
  source: {
2484
2859
  void: true,
2485
2860
  attributes: {
@@ -2496,11 +2871,11 @@ var html5 = {
2496
2871
  },
2497
2872
  width: {
2498
2873
  allowed: allowedIfParentIsPresent("picture"),
2499
- enum: ["/\\d+/"]
2874
+ enum: [validPositiveInteger]
2500
2875
  },
2501
2876
  height: {
2502
2877
  allowed: allowedIfParentIsPresent("picture"),
2503
- enum: ["/\\d+/"]
2878
+ enum: [validPositiveInteger]
2504
2879
  }
2505
2880
  },
2506
2881
  aria: {
@@ -2514,6 +2889,7 @@ var html5 = {
2514
2889
  source: "non-standard"
2515
2890
  }
2516
2891
  },
2892
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-span-element */
2517
2893
  span: {
2518
2894
  flow: true,
2519
2895
  phrasing: true,
@@ -2541,6 +2917,7 @@ var html5 = {
2541
2917
  source: "html5"
2542
2918
  }
2543
2919
  },
2920
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-strong-element */
2544
2921
  strong: {
2545
2922
  flow: true,
2546
2923
  phrasing: true,
@@ -2550,12 +2927,14 @@ var html5 = {
2550
2927
  naming: "prohibited"
2551
2928
  }
2552
2929
  },
2930
+ /* https://html.spec.whatwg.org/multipage/semantics.html#the-style-element */
2553
2931
  style: {
2554
2932
  metadata: true,
2555
2933
  aria: {
2556
2934
  naming: "prohibited"
2557
2935
  }
2558
2936
  },
2937
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-sub-and-sup-elements */
2559
2938
  sub: {
2560
2939
  flow: true,
2561
2940
  phrasing: true,
@@ -2565,6 +2944,7 @@ var html5 = {
2565
2944
  naming: "prohibited"
2566
2945
  }
2567
2946
  },
2947
+ /* https://html.spec.whatwg.org/multipage/interactive-elements.html#the-summary-element */
2568
2948
  summary: {
2569
2949
  permittedContent: ["@phrasing", "@heading"],
2570
2950
  focusable(node) {
@@ -2574,6 +2954,7 @@ var html5 = {
2574
2954
  implicitRole: "button"
2575
2955
  }
2576
2956
  },
2957
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-sub-and-sup-elements */
2577
2958
  sup: {
2578
2959
  flow: true,
2579
2960
  phrasing: true,
@@ -2583,6 +2964,7 @@ var html5 = {
2583
2964
  naming: "prohibited"
2584
2965
  }
2585
2966
  },
2967
+ /* https://html.spec.whatwg.org/multipage/embedded-content.html#svg-0 */
2586
2968
  svg: {
2587
2969
  flow: true,
2588
2970
  foreign: true,
@@ -2602,6 +2984,7 @@ var html5 = {
2602
2984
  * "no-unknown-elements" they are added here */
2603
2985
  "svg:desc": {},
2604
2986
  "svg:title": {},
2987
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-table-element */
2605
2988
  table: {
2606
2989
  flow: true,
2607
2990
  permittedContent: ["@script", "caption?", "colgroup", "tbody", "tfoot?", "thead?", "tr"],
@@ -2651,6 +3034,7 @@ var html5 = {
2651
3034
  implicitRole: "table"
2652
3035
  }
2653
3036
  },
3037
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-tbody-element */
2654
3038
  tbody: {
2655
3039
  implicitClosed: ["tbody", "tfoot"],
2656
3040
  permittedContent: ["@script", "tr"],
@@ -2675,6 +3059,7 @@ var html5 = {
2675
3059
  implicitRole: "rowgroup"
2676
3060
  }
2677
3061
  },
3062
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-td-element */
2678
3063
  td: {
2679
3064
  flow: true,
2680
3065
  implicitClosed: ["td", "th", "tr", "tbody", "tfoot"],
@@ -2698,7 +3083,12 @@ var html5 = {
2698
3083
  deprecated: true
2699
3084
  },
2700
3085
  colspan: {
2701
- enum: ["/\\d+/"]
3086
+ enum: [validPositiveInteger]
3087
+ },
3088
+ headers: {
3089
+ list: true,
3090
+ enum: [validId],
3091
+ reference: "id"
2702
3092
  },
2703
3093
  height: {
2704
3094
  deprecated: true
@@ -2707,7 +3097,7 @@ var html5 = {
2707
3097
  deprecated: true
2708
3098
  },
2709
3099
  rowspan: {
2710
- enum: ["/\\d+/"]
3100
+ enum: [validPositiveInteger]
2711
3101
  },
2712
3102
  scope: {
2713
3103
  deprecated: true
@@ -2736,16 +3126,38 @@ var html5 = {
2736
3126
  },
2737
3127
  permittedContent: ["@flow"]
2738
3128
  },
3129
+ /* https://html.spec.whatwg.org/multipage/scripting.html#the-template-element */
2739
3130
  template: {
2740
3131
  metadata: true,
2741
3132
  flow: true,
2742
3133
  phrasing: true,
2743
3134
  scriptSupporting: true,
2744
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
+ },
2745
3156
  aria: {
2746
3157
  naming: "prohibited"
2747
3158
  }
2748
3159
  },
3160
+ /* https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element */
2749
3161
  textarea: {
2750
3162
  flow: true,
2751
3163
  focusable: true,
@@ -2762,7 +3174,7 @@ var html5 = {
2762
3174
  boolean: true
2763
3175
  },
2764
3176
  cols: {
2765
- enum: ["/\\d+/"]
3177
+ enum: [validPositiveInteger]
2766
3178
  },
2767
3179
  datafld: {
2768
3180
  deprecated: true
@@ -2770,15 +3182,26 @@ var html5 = {
2770
3182
  datasrc: {
2771
3183
  deprecated: true
2772
3184
  },
3185
+ dirname: {
3186
+ enum: [validNonEmptyString]
3187
+ },
2773
3188
  disabled: {
2774
3189
  boolean: true
2775
3190
  },
3191
+ form: {
3192
+ enum: [validId],
3193
+ reference: "id"
3194
+ },
2776
3195
  maxlength: {
2777
- enum: ["/\\d+/"]
3196
+ enum: [validPositiveInteger]
2778
3197
  },
2779
3198
  minlength: {
2780
- enum: ["/\\d+/"]
3199
+ enum: [validPositiveInteger]
2781
3200
  },
3201
+ name: {
3202
+ enum: [validNonEmptyString]
3203
+ },
3204
+ placeholder: {},
2782
3205
  readonly: {
2783
3206
  boolean: true
2784
3207
  },
@@ -2786,7 +3209,7 @@ var html5 = {
2786
3209
  boolean: true
2787
3210
  },
2788
3211
  rows: {
2789
- enum: ["/\\d+/"]
3212
+ enum: [validPositiveInteger]
2790
3213
  },
2791
3214
  wrap: {
2792
3215
  enum: ["hard", "soft"]
@@ -2797,6 +3220,7 @@ var html5 = {
2797
3220
  },
2798
3221
  permittedContent: []
2799
3222
  },
3223
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-tfoot-element */
2800
3224
  tfoot: {
2801
3225
  implicitClosed: ["tbody"],
2802
3226
  optionalEnd: true,
@@ -2822,10 +3246,12 @@ var html5 = {
2822
3246
  implicitRole: "rowgroup"
2823
3247
  }
2824
3248
  },
3249
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-th-element */
2825
3250
  th: {
2826
3251
  flow: true,
2827
3252
  implicitClosed: ["td", "th", "tr", "tbody", "tfoot"],
2828
3253
  attributes: {
3254
+ abbr: {},
2829
3255
  align: {
2830
3256
  deprecated: true
2831
3257
  },
@@ -2841,11 +3267,16 @@ var html5 = {
2841
3267
  char: {
2842
3268
  deprecated: true
2843
3269
  },
3270
+ headers: {
3271
+ list: true,
3272
+ enum: [validId],
3273
+ reference: "id"
3274
+ },
2844
3275
  charoff: {
2845
3276
  deprecated: true
2846
3277
  },
2847
3278
  colspan: {
2848
- enum: ["/\\d+/"]
3279
+ enum: [validPositiveInteger]
2849
3280
  },
2850
3281
  height: {
2851
3282
  deprecated: true
@@ -2854,7 +3285,7 @@ var html5 = {
2854
3285
  deprecated: true
2855
3286
  },
2856
3287
  rowspan: {
2857
- enum: ["/\\d+/"]
3288
+ enum: [validPositiveInteger]
2858
3289
  },
2859
3290
  scope: {
2860
3291
  enum: ["row", "col", "rowgroup", "colgroup"]
@@ -2887,6 +3318,7 @@ var html5 = {
2887
3318
  permittedContent: ["@flow"],
2888
3319
  permittedDescendants: [{ exclude: ["header", "footer", "@sectioning", "@heading"] }]
2889
3320
  },
3321
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-thead-element */
2890
3322
  thead: {
2891
3323
  implicitClosed: ["tbody", "tfoot"],
2892
3324
  optionalEnd: true,
@@ -2912,15 +3344,20 @@ var html5 = {
2912
3344
  implicitRole: "rowgroup"
2913
3345
  }
2914
3346
  },
3347
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-time-element */
2915
3348
  time: {
2916
3349
  flow: true,
2917
3350
  phrasing: true,
3351
+ attributes: {
3352
+ datetime: {}
3353
+ },
2918
3354
  aria: {
2919
3355
  implicitRole: "time",
2920
3356
  naming: "prohibited"
2921
3357
  },
2922
3358
  permittedContent: ["@phrasing"]
2923
3359
  },
3360
+ /* https://html.spec.whatwg.org/multipage/document-metadata.html#the-title-element */
2924
3361
  title: {
2925
3362
  metadata: true,
2926
3363
  permittedContent: [],
@@ -2929,6 +3366,7 @@ var html5 = {
2929
3366
  naming: "prohibited"
2930
3367
  }
2931
3368
  },
3369
+ /* https://html.spec.whatwg.org/multipage/tables.html#the-tr-element */
2932
3370
  tr: {
2933
3371
  implicitClosed: ["tr", "tbody", "tfoot"],
2934
3372
  permittedContent: ["@script", "td", "th"],
@@ -2956,8 +3394,24 @@ var html5 = {
2956
3394
  implicitRole: "row"
2957
3395
  }
2958
3396
  },
3397
+ /* https://html.spec.whatwg.org/multipage/media.html#the-track-element */
2959
3398
  track: {
2960
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
+ },
2961
3415
  aria: {
2962
3416
  naming: "prohibited"
2963
3417
  }
@@ -2968,6 +3422,7 @@ var html5 = {
2968
3422
  source: "html4"
2969
3423
  }
2970
3424
  },
3425
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-u-element */
2971
3426
  u: {
2972
3427
  flow: true,
2973
3428
  phrasing: true,
@@ -2977,6 +3432,7 @@ var html5 = {
2977
3432
  naming: "prohibited"
2978
3433
  }
2979
3434
  },
3435
+ /* https://html.spec.whatwg.org/multipage/grouping-content.html#the-ul-element */
2980
3436
  ul: {
2981
3437
  flow: true,
2982
3438
  permittedContent: ["@script", "li"],
@@ -2992,6 +3448,7 @@ var html5 = {
2992
3448
  implicitRole: "list"
2993
3449
  }
2994
3450
  },
3451
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-var-element */
2995
3452
  var: {
2996
3453
  flow: true,
2997
3454
  phrasing: true,
@@ -3000,6 +3457,7 @@ var html5 = {
3000
3457
  naming: "prohibited"
3001
3458
  }
3002
3459
  },
3460
+ /* https://html.spec.whatwg.org/multipage/media.html#the-video-element */
3003
3461
  video: {
3004
3462
  flow: true,
3005
3463
  focusable(node) {
@@ -3012,28 +3470,50 @@ var html5 = {
3012
3470
  },
3013
3471
  transparent: ["@flow"],
3014
3472
  attributes: {
3473
+ autoplay: {
3474
+ boolean: true
3475
+ },
3476
+ controls: {
3477
+ boolean: true
3478
+ },
3015
3479
  crossorigin: {
3016
3480
  omit: true,
3017
3481
  enum: ["anonymous", "use-credentials"]
3018
3482
  },
3019
3483
  height: {
3020
- enum: ["/\\d+/"]
3484
+ enum: [validPositiveInteger]
3021
3485
  },
3022
3486
  itemprop: {
3023
3487
  allowed: allowedIfAttributeIsPresent("src")
3024
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
+ },
3025
3501
  preload: {
3026
3502
  omit: true,
3027
3503
  enum: ["none", "metadata", "auto"]
3028
3504
  },
3505
+ src: {
3506
+ enum: [validNonEmptyString]
3507
+ },
3029
3508
  width: {
3030
- enum: ["/\\d+/"]
3509
+ enum: [validPositiveInteger]
3031
3510
  }
3032
3511
  },
3033
3512
  permittedContent: ["@flow", "track", "source"],
3034
3513
  permittedDescendants: [{ exclude: ["audio", "video"] }],
3035
3514
  permittedOrder: ["source", "track", "@flow"]
3036
3515
  },
3516
+ /* https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-wbr-element */
3037
3517
  wbr: {
3038
3518
  flow: true,
3039
3519
  phrasing: true,
@@ -3042,6 +3522,7 @@ var html5 = {
3042
3522
  naming: "prohibited"
3043
3523
  }
3044
3524
  },
3525
+ /* https://html.spec.whatwg.org/multipage/obsolete.html#the-xmp-element */
3045
3526
  xmp: {
3046
3527
  deprecated: {
3047
3528
  documentation: "Use `<pre>` or `<code>` and escape content using HTML entities instead.",