html-validate 5.3.0 → 6.0.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/dist/cjs/browser.js +2 -6
  3. package/dist/cjs/browser.js.map +1 -1
  4. package/dist/cjs/cli.js +53 -28
  5. package/dist/cjs/cli.js.map +1 -1
  6. package/dist/cjs/core.d.ts +21 -7
  7. package/dist/cjs/core.js +618 -351
  8. package/dist/cjs/core.js.map +1 -1
  9. package/dist/cjs/html-validate.js +9 -9
  10. package/dist/cjs/html-validate.js.map +1 -1
  11. package/dist/cjs/index.d.ts +15 -2
  12. package/dist/cjs/index.js +2 -6
  13. package/dist/cjs/index.js.map +1 -1
  14. package/dist/cjs/{matchers.d.ts → jest-lib.d.ts} +2 -4
  15. package/dist/cjs/{matchers.js → jest-lib.js} +125 -87
  16. package/dist/cjs/jest-lib.js.map +1 -0
  17. package/dist/cjs/jest.d.ts +4 -0
  18. package/dist/cjs/jest.js +17 -0
  19. package/dist/cjs/jest.js.map +1 -0
  20. package/dist/cjs/test-utils.js +1 -1
  21. package/dist/es/cli.js +34 -9
  22. package/dist/es/cli.js.map +1 -1
  23. package/dist/es/core.d.ts +21 -7
  24. package/dist/es/core.js +582 -315
  25. package/dist/es/core.js.map +1 -1
  26. package/dist/es/html-validate.js +1 -1
  27. package/dist/es/html-validate.js.map +1 -1
  28. package/dist/es/index.d.ts +15 -2
  29. package/dist/es/{matchers.d.ts → jest-lib.d.ts} +2 -4
  30. package/dist/es/{matchers.js → jest-lib.js} +120 -82
  31. package/dist/es/jest-lib.js.map +1 -0
  32. package/dist/es/jest.d.ts +4 -0
  33. package/dist/es/jest.js +16 -0
  34. package/dist/es/jest.js.map +1 -0
  35. package/dist/schema/elements.json +43 -5
  36. package/elements/html5.json +940 -290
  37. package/jest.d.ts +1 -1
  38. package/jest.js +1 -1
  39. package/package.json +30 -28
  40. package/dist/cjs/matchers.js.map +0 -1
  41. package/dist/es/matchers.js.map +0 -1
@@ -3,14 +3,29 @@
3
3
 
4
4
  "*": {
5
5
  "attributes": {
6
- "contenteditable": ["", "true", "false"],
7
- "dir": ["ltr", "rtl", "auto"],
8
- "draggable": ["true", "false"],
9
- "id": ["/\\S+/"],
10
- "hidden": [],
11
- "tabindex": ["/-?\\d+/"]
12
- },
13
- "deprecatedAttributes": ["contextmenu"]
6
+ "contenteditable": {
7
+ "omit": true,
8
+ "enum": ["true", "false"]
9
+ },
10
+ "contextmenu": {
11
+ "deprecated": true
12
+ },
13
+ "dir": {
14
+ "enum": ["ltr", "rtl", "auto"]
15
+ },
16
+ "draggable": {
17
+ "enum": ["true", "false"]
18
+ },
19
+ "hidden": {
20
+ "boolean": true
21
+ },
22
+ "id": {
23
+ "enum": ["/\\S+/"]
24
+ },
25
+ "tabindex": {
26
+ "enum": ["/-?\\d+/"]
27
+ }
28
+ }
14
29
  },
15
30
 
16
31
  "a": {
@@ -18,19 +33,38 @@
18
33
  "phrasing": true,
19
34
  "interactive": true,
20
35
  "transparent": true,
21
- "deprecatedAttributes": [
22
- "charset",
23
- "coords",
24
- "datasrc",
25
- "datafld",
26
- "shape",
27
- "methods",
28
- "name",
29
- "urn"
30
- ],
31
36
  "attributes": {
32
- "download": ["", "/.+/"],
33
- "href": ["/.*/"]
37
+ "charset": {
38
+ "deprecated": true
39
+ },
40
+ "coords": {
41
+ "deprecated": true
42
+ },
43
+ "datafld": {
44
+ "deprecated": true
45
+ },
46
+ "datasrc": {
47
+ "deprecated": true
48
+ },
49
+ "download": {
50
+ "omit": true,
51
+ "enum": ["/.+/"]
52
+ },
53
+ "href": {
54
+ "enum": ["/.*/"]
55
+ },
56
+ "methods": {
57
+ "deprecated": true
58
+ },
59
+ "name": {
60
+ "deprecated": true
61
+ },
62
+ "shape": {
63
+ "deprecated": true
64
+ },
65
+ "urn": {
66
+ "deprecated": true
67
+ }
34
68
  },
35
69
  "permittedDescendants": [{ "exclude": "@interactive" }]
36
70
  },
@@ -61,16 +95,27 @@
61
95
  "deprecated": {
62
96
  "source": "html5"
63
97
  },
64
- "deprecatedAttributes": ["datasrc", "datafld"]
98
+ "attributes": {
99
+ "datafld": {
100
+ "deprecated": true
101
+ },
102
+ "datasrc": {
103
+ "deprecated": true
104
+ }
105
+ }
65
106
  },
66
107
 
67
108
  "area": {
68
109
  "flow": ["isDescendant", "map"],
69
110
  "phrasing": ["isDescendant", "map"],
70
111
  "void": true,
71
- "deprecatedAttributes": ["nohref"],
72
112
  "attributes": {
73
- "shape": ["rect", "circle", "poly", "default"]
113
+ "nohref": {
114
+ "deprecated": true
115
+ },
116
+ "shape": {
117
+ "enum": ["rect", "circle", "poly", "default"]
118
+ }
74
119
  },
75
120
  "requiredAncestors": ["map"]
76
121
  },
@@ -96,7 +141,10 @@
96
141
  "interactive": ["hasAttribute", "controls"],
97
142
  "transparent": ["@flow"],
98
143
  "attributes": {
99
- "preload": ["", "none", "metadata", "auto"]
144
+ "preload": {
145
+ "omit": true,
146
+ "enum": ["none", "metadata", "auto"]
147
+ }
100
148
  },
101
149
  "permittedContent": ["@flow", "track", "source"],
102
150
  "permittedDescendants": [{ "exclude": ["audio", "video"] }],
@@ -164,27 +212,55 @@
164
212
  },
165
213
 
166
214
  "body": {
167
- "deprecatedAttributes": [
168
- "alink",
169
- "background",
170
- "bgcolor",
171
- "link",
172
- "marginbottom",
173
- "marginheight",
174
- "marginleft",
175
- "marginright",
176
- "margintop",
177
- "marginwidth",
178
- "text",
179
- "vlink"
180
- ]
215
+ "attributes": {
216
+ "alink": {
217
+ "deprecated": true
218
+ },
219
+ "background": {
220
+ "deprecated": true
221
+ },
222
+ "bgcolor": {
223
+ "deprecated": true
224
+ },
225
+ "link": {
226
+ "deprecated": true
227
+ },
228
+ "marginbottom": {
229
+ "deprecated": true
230
+ },
231
+ "marginheight": {
232
+ "deprecated": true
233
+ },
234
+ "marginleft": {
235
+ "deprecated": true
236
+ },
237
+ "marginright": {
238
+ "deprecated": true
239
+ },
240
+ "margintop": {
241
+ "deprecated": true
242
+ },
243
+ "marginwidth": {
244
+ "deprecated": true
245
+ },
246
+ "text": {
247
+ "deprecated": true
248
+ },
249
+ "vlink": {
250
+ "deprecated": true
251
+ }
252
+ }
181
253
  },
182
254
 
183
255
  "br": {
184
256
  "flow": true,
185
257
  "phrasing": true,
186
258
  "void": true,
187
- "deprecatedAttributes": ["clear"]
259
+ "attributes": {
260
+ "clear": {
261
+ "deprecated": true
262
+ }
263
+ }
188
264
  },
189
265
 
190
266
  "button": {
@@ -192,12 +268,26 @@
192
268
  "phrasing": true,
193
269
  "interactive": true,
194
270
  "labelable": true,
195
- "deprecatedAttributes": ["datasrc", "datafld", "dataformatas"],
196
- "requiredAttributes": ["type"],
197
271
  "attributes": {
198
- "autofocus": [],
199
- "disabled": [],
200
- "type": ["submit", "reset", "button"]
272
+ "autofocus": {
273
+ "boolean": true
274
+ },
275
+ "datafld": {
276
+ "deprecated": true
277
+ },
278
+ "dataformatas": {
279
+ "deprecated": true
280
+ },
281
+ "datasrc": {
282
+ "deprecated": true
283
+ },
284
+ "disabled": {
285
+ "boolean": true
286
+ },
287
+ "type": {
288
+ "required": true,
289
+ "enum": ["submit", "reset", "button"]
290
+ }
201
291
  },
202
292
  "permittedContent": ["@phrasing"],
203
293
  "permittedDescendants": [{ "exclude": ["@interactive"] }],
@@ -212,9 +302,13 @@
212
302
  },
213
303
 
214
304
  "caption": {
215
- "deprecatedAttributes": ["align"],
216
305
  "permittedContent": ["@flow"],
217
- "permittedDescendants": [{ "exclude": ["table"] }]
306
+ "permittedDescendants": [{ "exclude": ["table"] }],
307
+ "attributes": {
308
+ "align": {
309
+ "deprecated": true
310
+ }
311
+ }
218
312
  },
219
313
 
220
314
  "center": {
@@ -239,16 +333,34 @@
239
333
 
240
334
  "col": {
241
335
  "attributes": {
242
- "span": ["/\\d+/"]
336
+ "align": {
337
+ "deprecated": true
338
+ },
339
+ "char": {
340
+ "deprecated": true
341
+ },
342
+ "charoff": {
343
+ "deprecated": true
344
+ },
345
+ "span": {
346
+ "enum": ["/\\d+/"]
347
+ },
348
+ "valign": {
349
+ "deprecated": true
350
+ },
351
+ "width": {
352
+ "deprecated": true
353
+ }
243
354
  },
244
- "deprecatedAttributes": ["align", "char", "charoff", "valign", "width"],
245
355
  "void": true
246
356
  },
247
357
 
248
358
  "colgroup": {
249
359
  "implicitClosed": ["colgroup"],
250
360
  "attributes": {
251
- "span": ["/\\d+/"]
361
+ "span": {
362
+ "enum": ["/\\d+/"]
363
+ }
252
364
  },
253
365
  "permittedContent": ["col", "template"]
254
366
  },
@@ -282,7 +394,9 @@
282
394
  "sectioning": true,
283
395
  "interactive": true,
284
396
  "attributes": {
285
- "open": []
397
+ "open": {
398
+ "boolean": true
399
+ }
286
400
  },
287
401
  "permittedContent": ["summary", "@flow"],
288
402
  "permittedOrder": ["summary", "@flow"],
@@ -305,14 +419,31 @@
305
419
 
306
420
  "div": {
307
421
  "flow": true,
308
- "deprecatedAttributes": ["align", "datasrc", "datafld", "dataformatas"],
309
- "permittedContent": ["@flow", "dt", "dd"]
422
+ "permittedContent": ["@flow", "dt", "dd"],
423
+ "attributes": {
424
+ "align": {
425
+ "deprecated": true
426
+ },
427
+ "datafld": {
428
+ "deprecated": true
429
+ },
430
+ "dataformatas": {
431
+ "deprecated": true
432
+ },
433
+ "datasrc": {
434
+ "deprecated": true
435
+ }
436
+ }
310
437
  },
311
438
 
312
439
  "dl": {
313
440
  "flow": true,
314
- "deprecatedAttributes": ["compact"],
315
- "permittedContent": ["@script", "dt", "dd", "div"]
441
+ "permittedContent": ["@script", "dt", "dd", "div"],
442
+ "attributes": {
443
+ "compact": {
444
+ "deprecated": true
445
+ }
446
+ }
316
447
  },
317
448
 
318
449
  "dt": {
@@ -335,17 +466,26 @@
335
466
  "interactive": true,
336
467
  "void": true,
337
468
  "attributes": {
338
- "src": ["/.+/"]
339
- },
340
- "requiredAttributes": ["src", "title"]
469
+ "src": {
470
+ "required": true,
471
+ "enum": ["/.+/"]
472
+ },
473
+ "title": {
474
+ "required": true
475
+ }
476
+ }
341
477
  },
342
478
 
343
479
  "fieldset": {
344
480
  "flow": true,
345
481
  "attributes": {
346
- "disabled": []
482
+ "datafld": {
483
+ "deprecated": true
484
+ },
485
+ "disabled": {
486
+ "boolean": true
487
+ }
347
488
  },
348
- "deprecatedAttributes": ["datafld"],
349
489
  "permittedContent": ["@flow", "legend?"],
350
490
  "permittedOrder": ["legend", "@flow"]
351
491
  },
@@ -378,11 +518,19 @@
378
518
  "flow": true,
379
519
  "form": true,
380
520
  "attributes": {
381
- "autocomplete": ["on", "off"],
382
- "method": ["get", "post"],
383
- "novalidate": []
521
+ "accept": {
522
+ "deprecated": true
523
+ },
524
+ "autocomplete": {
525
+ "enum": ["on", "off"]
526
+ },
527
+ "method": {
528
+ "enum": ["get", "post"]
529
+ },
530
+ "novalidate": {
531
+ "boolean": true
532
+ }
384
533
  },
385
- "deprecatedAttributes": ["accept"],
386
534
  "permittedContent": ["@flow"],
387
535
  "permittedDescendants": [{ "exclude": ["@form"] }]
388
536
  },
@@ -392,8 +540,17 @@
392
540
  "documentation": "The `<frame>` element can be replaced with the `<iframe>` element but a better solution is to remove usage of frames entirely.",
393
541
  "source": "html5"
394
542
  },
395
- "deprecatedAttributes": ["datasrc", "datafld"],
396
- "requiredAttributes": ["title"]
543
+ "attributes": {
544
+ "datafld": {
545
+ "deprecated": true
546
+ },
547
+ "datasrc": {
548
+ "deprecated": true
549
+ },
550
+ "title": {
551
+ "required": true
552
+ }
553
+ }
397
554
  },
398
555
 
399
556
  "frameset": {
@@ -406,49 +563,77 @@
406
563
  "h1": {
407
564
  "flow": true,
408
565
  "heading": true,
409
- "deprecatedAttributes": ["align"],
410
- "permittedContent": ["@phrasing"]
566
+ "permittedContent": ["@phrasing"],
567
+ "attributes": {
568
+ "align": {
569
+ "deprecated": true
570
+ }
571
+ }
411
572
  },
412
573
 
413
574
  "h2": {
414
575
  "flow": true,
415
576
  "heading": true,
416
- "deprecatedAttributes": ["align"],
417
- "permittedContent": ["@phrasing"]
577
+ "permittedContent": ["@phrasing"],
578
+ "attributes": {
579
+ "align": {
580
+ "deprecated": true
581
+ }
582
+ }
418
583
  },
419
584
 
420
585
  "h3": {
421
586
  "flow": true,
422
587
  "heading": true,
423
- "deprecatedAttributes": ["align"],
424
- "permittedContent": ["@phrasing"]
588
+ "permittedContent": ["@phrasing"],
589
+ "attributes": {
590
+ "align": {
591
+ "deprecated": true
592
+ }
593
+ }
425
594
  },
426
595
 
427
596
  "h4": {
428
597
  "flow": true,
429
598
  "heading": true,
430
- "deprecatedAttributes": ["align"],
431
- "permittedContent": ["@phrasing"]
599
+ "permittedContent": ["@phrasing"],
600
+ "attributes": {
601
+ "align": {
602
+ "deprecated": true
603
+ }
604
+ }
432
605
  },
433
606
 
434
607
  "h5": {
435
608
  "flow": true,
436
609
  "heading": true,
437
- "deprecatedAttributes": ["align"],
438
- "permittedContent": ["@phrasing"]
610
+ "permittedContent": ["@phrasing"],
611
+ "attributes": {
612
+ "align": {
613
+ "deprecated": true
614
+ }
615
+ }
439
616
  },
440
617
 
441
618
  "h6": {
442
619
  "flow": true,
443
620
  "heading": true,
444
- "deprecatedAttributes": ["align"],
445
- "permittedContent": ["@phrasing"]
621
+ "permittedContent": ["@phrasing"],
622
+ "attributes": {
623
+ "align": {
624
+ "deprecated": true
625
+ }
626
+ }
446
627
  },
447
628
 
448
629
  "head": {
449
- "deprecatedAttributes": ["profile"],
450
630
  "permittedContent": ["base?", "title?", "@meta"],
451
- "requiredContent": ["title"]
631
+ "requiredContent": ["title"],
632
+ "attributes": {
633
+ "profile": {
634
+ "deprecated": true
635
+ }
636
+ }
452
637
  },
453
638
 
454
639
  "header": {
@@ -464,15 +649,37 @@
464
649
  "hr": {
465
650
  "flow": true,
466
651
  "void": true,
467
- "deprecatedAttributes": ["align", "color", "noshade", "size", "width"]
652
+ "attributes": {
653
+ "align": {
654
+ "deprecated": true
655
+ },
656
+ "color": {
657
+ "deprecated": true
658
+ },
659
+ "noshade": {
660
+ "deprecated": true
661
+ },
662
+ "size": {
663
+ "deprecated": true
664
+ },
665
+ "width": {
666
+ "deprecated": true
667
+ }
668
+ }
468
669
  },
469
670
 
470
671
  "html": {
471
- "deprecatedAttributes": ["version"],
472
672
  "permittedContent": ["head?", "body?"],
473
673
  "permittedOrder": ["head", "body"],
474
- "requiredAttributes": ["lang"],
475
- "requiredContent": ["head", "body"]
674
+ "requiredContent": ["head", "body"],
675
+ "attributes": {
676
+ "lang": {
677
+ "required": true
678
+ },
679
+ "version": {
680
+ "deprecated": true
681
+ }
682
+ }
476
683
  },
477
684
 
478
685
  "i": {
@@ -487,21 +694,43 @@
487
694
  "embedded": true,
488
695
  "interactive": true,
489
696
  "attributes": {
490
- "src": ["/.+/"]
697
+ "align": {
698
+ "deprecated": true
699
+ },
700
+ "allowtransparency": {
701
+ "deprecated": true
702
+ },
703
+ "datafld": {
704
+ "deprecated": true
705
+ },
706
+ "datasrc": {
707
+ "deprecated": true
708
+ },
709
+ "frameborder": {
710
+ "deprecated": true
711
+ },
712
+ "hspace": {
713
+ "deprecated": true
714
+ },
715
+ "marginheight": {
716
+ "deprecated": true
717
+ },
718
+ "marginwidth": {
719
+ "deprecated": true
720
+ },
721
+ "scrolling": {
722
+ "deprecated": true
723
+ },
724
+ "src": {
725
+ "enum": ["/.+/"]
726
+ },
727
+ "title": {
728
+ "required": true
729
+ },
730
+ "vspace": {
731
+ "deprecated": true
732
+ }
491
733
  },
492
- "deprecatedAttributes": [
493
- "align",
494
- "allowtransparency",
495
- "datasrc",
496
- "datafld",
497
- "frameborder",
498
- "hspace",
499
- "marginheight",
500
- "marginwidth",
501
- "scrolling",
502
- "vspace"
503
- ],
504
- "requiredAttributes": ["title"],
505
734
  "permittedContent": []
506
735
  },
507
736
 
@@ -512,23 +741,48 @@
512
741
  "interactive": ["hasAttribute", "usemap"],
513
742
  "void": true,
514
743
  "attributes": {
515
- "crossorigin": ["", "anonymous", "use-credentials"],
516
- "decoding": ["sync", "async", "auto"],
517
- "ismap": [],
518
- "src": ["/.+/"],
519
- "srcset": ["/.+/"]
520
- },
521
- "deprecatedAttributes": [
522
- "datasrc",
523
- "datafld",
524
- "name",
525
- "lowsrc",
526
- "align",
527
- "border",
528
- "hspace",
529
- "vspace"
530
- ],
531
- "requiredAttributes": ["src"]
744
+ "align": {
745
+ "deprecated": true
746
+ },
747
+ "border": {
748
+ "deprecated": true
749
+ },
750
+ "crossorigin": {
751
+ "omit": true,
752
+ "enum": ["anonymous", "use-credentials"]
753
+ },
754
+ "datafld": {
755
+ "deprecated": true
756
+ },
757
+ "datasrc": {
758
+ "deprecated": true
759
+ },
760
+ "decoding": {
761
+ "enum": ["sync", "async", "auto"]
762
+ },
763
+ "hspace": {
764
+ "deprecated": true
765
+ },
766
+ "ismap": {
767
+ "boolean": true
768
+ },
769
+ "lowsrc": {
770
+ "deprecated": true
771
+ },
772
+ "name": {
773
+ "deprecated": true
774
+ },
775
+ "src": {
776
+ "required": true,
777
+ "enum": ["/.+/"]
778
+ },
779
+ "srcset": {
780
+ "enum": ["/.+/"]
781
+ },
782
+ "vspace": {
783
+ "deprecated": true
784
+ }
785
+ }
532
786
  },
533
787
 
534
788
  "input": {
@@ -537,51 +791,86 @@
537
791
  "interactive": ["matchAttribute", ["type", "!=", "hidden"]],
538
792
  "void": true,
539
793
  "labelable": ["matchAttribute", ["type", "!=", "hidden"]],
540
- "deprecatedAttributes": [
541
- "datasrc",
542
- "datafld",
543
- "dataformatas",
544
- "ismap",
545
- "usemap",
546
- "align",
547
- "hspace",
548
- "vspace"
549
- ],
550
- "requiredAttributes": ["type"],
551
794
  "attributes": {
552
- "autofocus": [],
553
- "capture": ["", "environment", "user"],
554
- "checked": [],
555
- "disabled": [],
556
- "inputmode": ["none", "text", "decimal", "numeric", "tel", "search", "email", "url"],
557
- "multiple": [],
558
- "readonly": [],
559
- "required": [],
560
- "spellcheck": ["default", "false", "true"],
561
- "type": [
562
- "button",
563
- "checkbox",
564
- "color",
565
- "date",
566
- "datetime-local",
567
- "email",
568
- "file",
569
- "hidden",
570
- "image",
571
- "month",
572
- "number",
573
- "password",
574
- "radio",
575
- "range",
576
- "reset",
577
- "search",
578
- "submit",
579
- "tel",
580
- "text",
581
- "time",
582
- "url",
583
- "week"
584
- ]
795
+ "align": {
796
+ "deprecated": true
797
+ },
798
+ "autofocus": {
799
+ "boolean": true
800
+ },
801
+ "capture": {
802
+ "omit": true,
803
+ "enum": ["environment", "user"]
804
+ },
805
+ "checked": {
806
+ "boolean": true
807
+ },
808
+ "datafld": {
809
+ "deprecated": true
810
+ },
811
+ "dataformatas": {
812
+ "deprecated": true
813
+ },
814
+ "datasrc": {
815
+ "deprecated": true
816
+ },
817
+ "disabled": {
818
+ "boolean": true
819
+ },
820
+ "hspace": {
821
+ "deprecated": true
822
+ },
823
+ "inputmode": {
824
+ "enum": ["none", "text", "decimal", "numeric", "tel", "search", "email", "url"]
825
+ },
826
+ "ismap": {
827
+ "deprecated": true
828
+ },
829
+ "multiple": {
830
+ "boolean": true
831
+ },
832
+ "readonly": {
833
+ "boolean": true
834
+ },
835
+ "required": {
836
+ "boolean": true
837
+ },
838
+ "spellcheck": {
839
+ "enum": ["default", "false", "true"]
840
+ },
841
+ "type": {
842
+ "required": true,
843
+ "enum": [
844
+ "button",
845
+ "checkbox",
846
+ "color",
847
+ "date",
848
+ "datetime-local",
849
+ "email",
850
+ "file",
851
+ "hidden",
852
+ "image",
853
+ "month",
854
+ "number",
855
+ "password",
856
+ "radio",
857
+ "range",
858
+ "reset",
859
+ "search",
860
+ "submit",
861
+ "tel",
862
+ "text",
863
+ "time",
864
+ "url",
865
+ "week"
866
+ ]
867
+ },
868
+ "usemap": {
869
+ "deprecated": true
870
+ },
871
+ "vspace": {
872
+ "deprecated": true
873
+ }
585
874
  }
586
875
  },
587
876
 
@@ -615,32 +904,77 @@
615
904
  "flow": true,
616
905
  "phrasing": true,
617
906
  "interactive": true,
618
- "deprecatedAttributes": ["datasrc", "datafld", "dataformatas"],
619
907
  "permittedContent": ["@phrasing"],
620
- "permittedDescendants": [{ "exclude": ["label"] }]
908
+ "permittedDescendants": [{ "exclude": ["label"] }],
909
+ "attributes": {
910
+ "datafld": {
911
+ "deprecated": true
912
+ },
913
+ "dataformatas": {
914
+ "deprecated": true
915
+ },
916
+ "datasrc": {
917
+ "deprecated": true
918
+ }
919
+ }
621
920
  },
622
921
 
623
922
  "legend": {
624
- "deprecatedAttributes": ["align", "datasrc", "datafld", "dataformatas"],
625
- "permittedContent": ["@phrasing", "@heading"]
923
+ "permittedContent": ["@phrasing", "@heading"],
924
+ "attributes": {
925
+ "align": {
926
+ "deprecated": true
927
+ },
928
+ "datafld": {
929
+ "deprecated": true
930
+ },
931
+ "dataformatas": {
932
+ "deprecated": true
933
+ },
934
+ "datasrc": {
935
+ "deprecated": true
936
+ }
937
+ }
626
938
  },
627
939
 
628
940
  "li": {
629
941
  "implicitClosed": ["li"],
630
- "deprecatedAttributes": ["type"],
631
- "permittedContent": ["@flow"]
942
+ "permittedContent": ["@flow"],
943
+ "attributes": {
944
+ "type": {
945
+ "deprecated": true
946
+ }
947
+ }
632
948
  },
633
949
 
634
950
  "link": {
635
951
  "metadata": true,
636
952
  "void": true,
637
953
  "attributes": {
638
- "crossorigin": ["", "anonymous", "use-credentials"],
639
- "integrity": ["/.+/"],
640
- "href": ["/.+/"]
641
- },
642
- "requiredAttributes": ["href"],
643
- "deprecatedAttributes": ["charset", "methods", "urn", "target"]
954
+ "charset": {
955
+ "deprecated": true
956
+ },
957
+ "crossorigin": {
958
+ "omit": true,
959
+ "enum": ["anonymous", "use-credentials"]
960
+ },
961
+ "href": {
962
+ "required": true,
963
+ "enum": ["/.+/"]
964
+ },
965
+ "integrity": {
966
+ "enum": ["/.+/"]
967
+ },
968
+ "methods": {
969
+ "deprecated": true
970
+ },
971
+ "target": {
972
+ "deprecated": true
973
+ },
974
+ "urn": {
975
+ "deprecated": true
976
+ }
977
+ }
644
978
  },
645
979
 
646
980
  "listing": {
@@ -670,7 +1004,17 @@
670
1004
  "documentation": "Marked as obsolete by both W3C and WHATWG standards but still implemented in most browsers. Animated text should be avoided for accessibility reasons as well.",
671
1005
  "source": "html5"
672
1006
  },
673
- "deprecatedAttributes": ["datasrc", "datafld", "dataformatas"]
1007
+ "attributes": {
1008
+ "datafld": {
1009
+ "deprecated": true
1010
+ },
1011
+ "dataformatas": {
1012
+ "deprecated": true
1013
+ },
1014
+ "datasrc": {
1015
+ "deprecated": true
1016
+ }
1017
+ }
674
1018
  },
675
1019
 
676
1020
  "math": {
@@ -678,18 +1022,39 @@
678
1022
  "foreign": true,
679
1023
  "phrasing": true,
680
1024
  "embedded": true,
681
- "deprecatedAttributes": ["name", "align", "hspace", "vspace"],
682
1025
  "attributes": {
683
- "dir": ["ltr", "rtl"],
684
- "display": ["block", "inline"],
685
- "overflow": ["linebreak", "scroll", "elide", "truncate", "scale"]
1026
+ "align": {
1027
+ "deprecated": true
1028
+ },
1029
+ "dir": {
1030
+ "enum": ["ltr", "rtl"]
1031
+ },
1032
+ "display": {
1033
+ "enum": ["block", "inline"]
1034
+ },
1035
+ "hspace": {
1036
+ "deprecated": true
1037
+ },
1038
+ "name": {
1039
+ "deprecated": true
1040
+ },
1041
+ "overflow": {
1042
+ "enum": ["linebreak", "scroll", "elide", "truncate", "scale"]
1043
+ },
1044
+ "vspace": {
1045
+ "deprecated": true
1046
+ }
686
1047
  }
687
1048
  },
688
1049
 
689
1050
  "meta": {
690
1051
  "metadata": true,
691
1052
  "void": true,
692
- "deprecatedAttributes": ["scheme"]
1053
+ "attributes": {
1054
+ "scheme": {
1055
+ "deprecated": true
1056
+ }
1057
+ }
693
1058
  },
694
1059
 
695
1060
  "meter": {
@@ -756,24 +1121,52 @@
756
1121
  "interactive": ["hasAttribute", "usemap"],
757
1122
  "transparent": true,
758
1123
  "attributes": {
759
- "data": ["/.+/"]
1124
+ "align": {
1125
+ "deprecated": true
1126
+ },
1127
+ "archive": {
1128
+ "deprecated": true
1129
+ },
1130
+ "border": {
1131
+ "deprecated": true
1132
+ },
1133
+ "classid": {
1134
+ "deprecated": true
1135
+ },
1136
+ "code": {
1137
+ "deprecated": true
1138
+ },
1139
+ "codebase": {
1140
+ "deprecated": true
1141
+ },
1142
+ "codetype": {
1143
+ "deprecated": true
1144
+ },
1145
+ "data": {
1146
+ "enum": ["/.+/"]
1147
+ },
1148
+ "datafld": {
1149
+ "deprecated": true
1150
+ },
1151
+ "dataformatas": {
1152
+ "deprecated": true
1153
+ },
1154
+ "datasrc": {
1155
+ "deprecated": true
1156
+ },
1157
+ "declare": {
1158
+ "deprecated": true
1159
+ },
1160
+ "hspace": {
1161
+ "deprecated": true
1162
+ },
1163
+ "standby": {
1164
+ "deprecated": true
1165
+ },
1166
+ "vspace": {
1167
+ "deprecated": true
1168
+ }
760
1169
  },
761
- "deprecatedAttributes": [
762
- "align",
763
- "archive",
764
- "border",
765
- "classid",
766
- "code",
767
- "codebase",
768
- "codetype",
769
- "datasrc",
770
- "datafld",
771
- "dataformatas",
772
- "declare",
773
- "hspace",
774
- "standby",
775
- "vspace"
776
- ],
777
1170
  "permittedContent": ["param", "@flow"],
778
1171
  "permittedOrder": ["param", "@flow"]
779
1172
  },
@@ -781,17 +1174,25 @@
781
1174
  "ol": {
782
1175
  "flow": true,
783
1176
  "attributes": {
784
- "reversed": [],
785
- "type": ["a", "A", "i", "I", "1"]
1177
+ "compact": {
1178
+ "deprecated": true
1179
+ },
1180
+ "reversed": {
1181
+ "boolean": true
1182
+ },
1183
+ "type": {
1184
+ "enum": ["a", "A", "i", "I", "1"]
1185
+ }
786
1186
  },
787
- "deprecatedAttributes": ["compact"],
788
1187
  "permittedContent": ["@script", "li"]
789
1188
  },
790
1189
 
791
1190
  "optgroup": {
792
1191
  "implicitClosed": ["optgroup"],
793
1192
  "attributes": {
794
- "disabled": []
1193
+ "disabled": {
1194
+ "boolean": true
1195
+ }
795
1196
  },
796
1197
  "permittedContent": ["@script", "option"]
797
1198
  },
@@ -799,10 +1200,22 @@
799
1200
  "option": {
800
1201
  "implicitClosed": ["option"],
801
1202
  "attributes": {
802
- "disabled": [],
803
- "selected": []
1203
+ "dataformatas": {
1204
+ "deprecated": true
1205
+ },
1206
+ "datasrc": {
1207
+ "deprecated": true
1208
+ },
1209
+ "disabled": {
1210
+ "boolean": true
1211
+ },
1212
+ "name": {
1213
+ "deprecated": true
1214
+ },
1215
+ "selected": {
1216
+ "boolean": true
1217
+ }
804
1218
  },
805
- "deprecatedAttributes": ["datasrc", "dataformatas", "name"],
806
1219
  "permittedContent": []
807
1220
  },
808
1221
 
@@ -843,13 +1256,27 @@
843
1256
  "table",
844
1257
  "ul"
845
1258
  ],
846
- "deprecatedAttributes": ["align"],
847
- "permittedContent": ["@phrasing"]
1259
+ "permittedContent": ["@phrasing"],
1260
+ "attributes": {
1261
+ "align": {
1262
+ "deprecated": true
1263
+ }
1264
+ }
848
1265
  },
849
1266
 
850
1267
  "param": {
851
1268
  "void": true,
852
- "deprecatedAttributes": ["datafld", "type", "valuetype"]
1269
+ "attributes": {
1270
+ "datafld": {
1271
+ "deprecated": true
1272
+ },
1273
+ "type": {
1274
+ "deprecated": true
1275
+ },
1276
+ "valuetype": {
1277
+ "deprecated": true
1278
+ }
1279
+ }
853
1280
  },
854
1281
 
855
1282
  "picture": {
@@ -870,8 +1297,12 @@
870
1297
 
871
1298
  "pre": {
872
1299
  "flow": true,
873
- "deprecatedAttributes": ["width"],
874
- "permittedContent": ["@phrasing"]
1300
+ "permittedContent": ["@phrasing"],
1301
+ "attributes": {
1302
+ "width": {
1303
+ "deprecated": true
1304
+ }
1305
+ }
875
1306
  },
876
1307
 
877
1308
  "progress": {
@@ -932,14 +1363,35 @@
932
1363
  "phrasing": true,
933
1364
  "scriptSupporting": true,
934
1365
  "attributes": {
935
- "async": [],
936
- "crossorigin": ["", "anonymous", "use-credentials"],
937
- "defer": [],
938
- "integrity": ["/.+/"],
939
- "nomodule": [],
940
- "src": ["/.+/"]
941
- },
942
- "deprecatedAttributes": ["language", "event", "for"]
1366
+ "async": {
1367
+ "boolean": true
1368
+ },
1369
+ "crossorigin": {
1370
+ "omit": true,
1371
+ "enum": ["anonymous", "use-credentials"]
1372
+ },
1373
+ "defer": {
1374
+ "boolean": true
1375
+ },
1376
+ "event": {
1377
+ "deprecated": true
1378
+ },
1379
+ "for": {
1380
+ "deprecated": true
1381
+ },
1382
+ "integrity": {
1383
+ "enum": ["/.+/"]
1384
+ },
1385
+ "language": {
1386
+ "deprecated": true
1387
+ },
1388
+ "nomodule": {
1389
+ "boolean": true
1390
+ },
1391
+ "src": {
1392
+ "enum": ["/.+/"]
1393
+ }
1394
+ }
943
1395
  },
944
1396
 
945
1397
  "section": {
@@ -954,11 +1406,21 @@
954
1406
  "interactive": true,
955
1407
  "labelable": true,
956
1408
  "attributes": {
957
- "autofocus": [],
958
- "disabled": [],
959
- "multiple": [],
960
- "required": [],
961
- "size": ["/\\d+/"]
1409
+ "autofocus": {
1410
+ "boolean": true
1411
+ },
1412
+ "disabled": {
1413
+ "boolean": true
1414
+ },
1415
+ "multiple": {
1416
+ "boolean": true
1417
+ },
1418
+ "required": {
1419
+ "boolean": true
1420
+ },
1421
+ "size": {
1422
+ "enum": ["/\\d+/"]
1423
+ }
962
1424
  },
963
1425
  "permittedContent": ["@script", "datasrc", "datafld", "dataformatas", "option", "optgroup"]
964
1426
  },
@@ -990,8 +1452,18 @@
990
1452
  "span": {
991
1453
  "flow": true,
992
1454
  "phrasing": true,
993
- "deprecatedAttributes": ["datasrc", "datafld", "dataformatas"],
994
- "permittedContent": ["@phrasing"]
1455
+ "permittedContent": ["@phrasing"],
1456
+ "attributes": {
1457
+ "datafld": {
1458
+ "deprecated": true
1459
+ },
1460
+ "dataformatas": {
1461
+ "deprecated": true
1462
+ },
1463
+ "datasrc": {
1464
+ "deprecated": true
1465
+ }
1466
+ }
995
1467
  },
996
1468
 
997
1469
  "strike": {
@@ -1038,51 +1510,117 @@
1038
1510
 
1039
1511
  "table": {
1040
1512
  "flow": true,
1041
- "deprecatedAttributes": [
1042
- "background",
1043
- "datasrc",
1044
- "dataformatas",
1045
- "datapagesize",
1046
- "summary",
1047
- "align",
1048
- "bgcolor",
1049
- "bordercolor",
1050
- "cellpadding",
1051
- "cellspacing",
1052
- "frame",
1053
- "rules",
1054
- "width"
1055
- ],
1056
1513
  "permittedContent": ["@script", "caption?", "colgroup", "tbody", "tfoot?", "thead?", "tr"],
1057
- "permittedOrder": ["caption", "colgroup", "thead", "tbody", "tr", "tfoot"]
1514
+ "permittedOrder": ["caption", "colgroup", "thead", "tbody", "tr", "tfoot"],
1515
+ "attributes": {
1516
+ "align": {
1517
+ "deprecated": true
1518
+ },
1519
+ "background": {
1520
+ "deprecated": true
1521
+ },
1522
+ "bgcolor": {
1523
+ "deprecated": true
1524
+ },
1525
+ "bordercolor": {
1526
+ "deprecated": true
1527
+ },
1528
+ "cellpadding": {
1529
+ "deprecated": true
1530
+ },
1531
+ "cellspacing": {
1532
+ "deprecated": true
1533
+ },
1534
+ "dataformatas": {
1535
+ "deprecated": true
1536
+ },
1537
+ "datapagesize": {
1538
+ "deprecated": true
1539
+ },
1540
+ "datasrc": {
1541
+ "deprecated": true
1542
+ },
1543
+ "frame": {
1544
+ "deprecated": true
1545
+ },
1546
+ "rules": {
1547
+ "deprecated": true
1548
+ },
1549
+ "summary": {
1550
+ "deprecated": true
1551
+ },
1552
+ "width": {
1553
+ "deprecated": true
1554
+ }
1555
+ }
1058
1556
  },
1059
1557
 
1060
1558
  "tbody": {
1061
1559
  "implicitClosed": ["tbody", "tfoot"],
1062
- "deprecatedAttributes": ["align", "background", "char", "charoff", "valign"],
1063
- "permittedContent": ["@script", "tr"]
1560
+ "permittedContent": ["@script", "tr"],
1561
+ "attributes": {
1562
+ "align": {
1563
+ "deprecated": true
1564
+ },
1565
+ "background": {
1566
+ "deprecated": true
1567
+ },
1568
+ "char": {
1569
+ "deprecated": true
1570
+ },
1571
+ "charoff": {
1572
+ "deprecated": true
1573
+ },
1574
+ "valign": {
1575
+ "deprecated": true
1576
+ }
1577
+ }
1064
1578
  },
1065
1579
 
1066
1580
  "td": {
1067
1581
  "flow": true,
1068
1582
  "implicitClosed": ["td", "th"],
1069
1583
  "attributes": {
1070
- "colspan": ["/\\d+/"],
1071
- "rowspan": ["/\\d+/"]
1584
+ "align": {
1585
+ "deprecated": true
1586
+ },
1587
+ "axis": {
1588
+ "deprecated": true
1589
+ },
1590
+ "background": {
1591
+ "deprecated": true
1592
+ },
1593
+ "bgcolor": {
1594
+ "deprecated": true
1595
+ },
1596
+ "char": {
1597
+ "deprecated": true
1598
+ },
1599
+ "charoff": {
1600
+ "deprecated": true
1601
+ },
1602
+ "colspan": {
1603
+ "enum": ["/\\d+/"]
1604
+ },
1605
+ "height": {
1606
+ "deprecated": true
1607
+ },
1608
+ "nowrap": {
1609
+ "deprecated": true
1610
+ },
1611
+ "rowspan": {
1612
+ "enum": ["/\\d+/"]
1613
+ },
1614
+ "scope": {
1615
+ "deprecated": true
1616
+ },
1617
+ "valign": {
1618
+ "deprecated": true
1619
+ },
1620
+ "width": {
1621
+ "deprecated": true
1622
+ }
1072
1623
  },
1073
- "deprecatedAttributes": [
1074
- "align",
1075
- "axis",
1076
- "background",
1077
- "bgcolor",
1078
- "char",
1079
- "charoff",
1080
- "height",
1081
- "nowrap",
1082
- "scope",
1083
- "valign",
1084
- "width"
1085
- ],
1086
1624
  "permittedContent": ["@flow"]
1087
1625
  },
1088
1626
 
@@ -1099,57 +1637,140 @@
1099
1637
  "interactive": true,
1100
1638
  "labelable": true,
1101
1639
  "attributes": {
1102
- "autocomplete": ["on", "off"],
1103
- "autofocus": [],
1104
- "cols": ["/\\d+/"],
1105
- "disabled": [],
1106
- "maxlength": ["/\\d+/"],
1107
- "minlength": ["/\\d+/"],
1108
- "readonly": [],
1109
- "required": [],
1110
- "rows": ["/\\d+/"],
1111
- "spellcheck": ["true", "default", "false"],
1112
- "wrap": ["hard", "soft"]
1640
+ "autocomplete": {
1641
+ "enum": ["on", "off"]
1642
+ },
1643
+ "autofocus": {
1644
+ "boolean": true
1645
+ },
1646
+ "cols": {
1647
+ "enum": ["/\\d+/"]
1648
+ },
1649
+ "datafld": {
1650
+ "deprecated": true
1651
+ },
1652
+ "datasrc": {
1653
+ "deprecated": true
1654
+ },
1655
+ "disabled": {
1656
+ "boolean": true
1657
+ },
1658
+ "maxlength": {
1659
+ "enum": ["/\\d+/"]
1660
+ },
1661
+ "minlength": {
1662
+ "enum": ["/\\d+/"]
1663
+ },
1664
+ "readonly": {
1665
+ "boolean": true
1666
+ },
1667
+ "required": {
1668
+ "boolean": true
1669
+ },
1670
+ "rows": {
1671
+ "enum": ["/\\d+/"]
1672
+ },
1673
+ "spellcheck": {
1674
+ "enum": ["true", "default", "false"]
1675
+ },
1676
+ "wrap": {
1677
+ "enum": ["hard", "soft"]
1678
+ }
1113
1679
  },
1114
- "deprecatedAttributes": ["datasrc", "datafld"],
1115
1680
  "permittedContent": []
1116
1681
  },
1117
1682
 
1118
1683
  "tfoot": {
1119
1684
  "implicitClosed": ["tbody"],
1120
- "deprecatedAttributes": ["align", "background", "char", "charoff", "valign"],
1121
- "permittedContent": ["@script", "tr"]
1685
+ "permittedContent": ["@script", "tr"],
1686
+ "attributes": {
1687
+ "align": {
1688
+ "deprecated": true
1689
+ },
1690
+ "background": {
1691
+ "deprecated": true
1692
+ },
1693
+ "char": {
1694
+ "deprecated": true
1695
+ },
1696
+ "charoff": {
1697
+ "deprecated": true
1698
+ },
1699
+ "valign": {
1700
+ "deprecated": true
1701
+ }
1702
+ }
1122
1703
  },
1123
1704
 
1124
1705
  "th": {
1125
1706
  "flow": true,
1126
1707
  "implicitClosed": ["td", "th"],
1127
1708
  "attributes": {
1128
- "colspan": ["/\\d+/"],
1129
- "rowspan": ["/\\d+/"],
1130
- "scope": ["row", "col", "rowgroup", "colgroup", "auto"]
1709
+ "align": {
1710
+ "deprecated": true
1711
+ },
1712
+ "axis": {
1713
+ "deprecated": true
1714
+ },
1715
+ "background": {
1716
+ "deprecated": true
1717
+ },
1718
+ "bgcolor": {
1719
+ "deprecated": true
1720
+ },
1721
+ "char": {
1722
+ "deprecated": true
1723
+ },
1724
+ "charoff": {
1725
+ "deprecated": true
1726
+ },
1727
+ "colspan": {
1728
+ "enum": ["/\\d+/"]
1729
+ },
1730
+ "height": {
1731
+ "deprecated": true
1732
+ },
1733
+ "nowrap": {
1734
+ "deprecated": true
1735
+ },
1736
+ "rowspan": {
1737
+ "enum": ["/\\d+/"]
1738
+ },
1739
+ "scope": {
1740
+ "required": true,
1741
+ "enum": ["row", "col", "rowgroup", "colgroup", "auto"]
1742
+ },
1743
+ "valign": {
1744
+ "deprecated": true
1745
+ },
1746
+ "width": {
1747
+ "deprecated": true
1748
+ }
1131
1749
  },
1132
- "deprecatedAttributes": [
1133
- "align",
1134
- "axis",
1135
- "background",
1136
- "bgcolor",
1137
- "char",
1138
- "charoff",
1139
- "height",
1140
- "nowrap",
1141
- "valign",
1142
- "width"
1143
- ],
1144
- "requiredAttributes": ["scope"],
1145
1750
  "permittedContent": ["@flow"],
1146
1751
  "permittedDescendants": [{ "exclude": ["header", "footer", "@sectioning", "@heading"] }]
1147
1752
  },
1148
1753
 
1149
1754
  "thead": {
1150
1755
  "implicitClosed": ["tbody", "tfoot"],
1151
- "deprecatedAttributes": ["align", "background", "char", "charoff", "valign"],
1152
- "permittedContent": ["@script", "tr"]
1756
+ "permittedContent": ["@script", "tr"],
1757
+ "attributes": {
1758
+ "align": {
1759
+ "deprecated": true
1760
+ },
1761
+ "background": {
1762
+ "deprecated": true
1763
+ },
1764
+ "char": {
1765
+ "deprecated": true
1766
+ },
1767
+ "charoff": {
1768
+ "deprecated": true
1769
+ },
1770
+ "valign": {
1771
+ "deprecated": true
1772
+ }
1773
+ }
1153
1774
  },
1154
1775
 
1155
1776
  "time": {
@@ -1165,8 +1786,27 @@
1165
1786
 
1166
1787
  "tr": {
1167
1788
  "implicitClosed": ["tr"],
1168
- "deprecatedAttributes": ["align", "background", "bgcolor", "char", "charoff", "valign"],
1169
- "permittedContent": ["@script", "td", "th"]
1789
+ "permittedContent": ["@script", "td", "th"],
1790
+ "attributes": {
1791
+ "align": {
1792
+ "deprecated": true
1793
+ },
1794
+ "background": {
1795
+ "deprecated": true
1796
+ },
1797
+ "bgcolor": {
1798
+ "deprecated": true
1799
+ },
1800
+ "char": {
1801
+ "deprecated": true
1802
+ },
1803
+ "charoff": {
1804
+ "deprecated": true
1805
+ },
1806
+ "valign": {
1807
+ "deprecated": true
1808
+ }
1809
+ }
1170
1810
  },
1171
1811
 
1172
1812
  "track": {
@@ -1188,8 +1828,15 @@
1188
1828
 
1189
1829
  "ul": {
1190
1830
  "flow": true,
1191
- "deprecatedAttributes": ["compact", "type"],
1192
- "permittedContent": ["@script", "li"]
1831
+ "permittedContent": ["@script", "li"],
1832
+ "attributes": {
1833
+ "compact": {
1834
+ "deprecated": true
1835
+ },
1836
+ "type": {
1837
+ "deprecated": true
1838
+ }
1839
+ }
1193
1840
  },
1194
1841
 
1195
1842
  "var": {
@@ -1205,7 +1852,10 @@
1205
1852
  "interactive": ["hasAttribute", "controls"],
1206
1853
  "transparent": ["@flow"],
1207
1854
  "attributes": {
1208
- "preload": ["", "none", "metadata", "auto"]
1855
+ "preload": {
1856
+ "omit": true,
1857
+ "enum": ["none", "metadata", "auto"]
1858
+ }
1209
1859
  },
1210
1860
  "permittedContent": ["@flow", "track", "source"],
1211
1861
  "permittedDescendants": [{ "exclude": ["audio", "video"] }],