html-validate 7.7.0 → 7.8.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 (59) hide show
  1. package/README.md +16 -16
  2. package/dist/cjs/browser.d.ts +4 -2
  3. package/dist/cjs/browser.js +11 -7
  4. package/dist/cjs/browser.js.map +1 -1
  5. package/dist/cjs/cli.js +2 -0
  6. package/dist/cjs/cli.js.map +1 -1
  7. package/dist/cjs/core.d.ts +26 -67
  8. package/dist/cjs/core.js +189 -2388
  9. package/dist/cjs/core.js.map +1 -1
  10. package/dist/cjs/elements.js +3704 -0
  11. package/dist/cjs/elements.js.map +1 -0
  12. package/dist/cjs/html-validate.js +3 -0
  13. package/dist/cjs/html-validate.js.map +1 -1
  14. package/dist/cjs/index.d.ts +5 -3
  15. package/dist/cjs/index.js +11 -7
  16. package/dist/cjs/index.js.map +1 -1
  17. package/dist/cjs/jest-lib.js +1 -0
  18. package/dist/cjs/jest-lib.js.map +1 -1
  19. package/dist/cjs/jest.d.ts +1 -1
  20. package/dist/cjs/jest.js +3 -0
  21. package/dist/cjs/jest.js.map +1 -1
  22. package/dist/cjs/meta-helper.d.ts +27 -0
  23. package/dist/cjs/meta-helper.js +64 -0
  24. package/dist/cjs/meta-helper.js.map +1 -0
  25. package/dist/cjs/rules-helper.d.ts +45 -0
  26. package/dist/cjs/rules-helper.js +408 -0
  27. package/dist/cjs/rules-helper.js.map +1 -0
  28. package/dist/cjs/test-utils.d.ts +1 -1
  29. package/dist/es/browser.d.ts +4 -2
  30. package/dist/es/browser.js +4 -2
  31. package/dist/es/browser.js.map +1 -1
  32. package/dist/es/cli.js +3 -1
  33. package/dist/es/cli.js.map +1 -1
  34. package/dist/es/core.d.ts +26 -67
  35. package/dist/es/core.js +156 -2357
  36. package/dist/es/core.js.map +1 -1
  37. package/dist/es/elements.js +3701 -0
  38. package/dist/es/elements.js.map +1 -0
  39. package/dist/es/html-validate.js +3 -1
  40. package/dist/es/html-validate.js.map +1 -1
  41. package/dist/es/index.d.ts +5 -3
  42. package/dist/es/index.js +4 -2
  43. package/dist/es/index.js.map +1 -1
  44. package/dist/es/jest-lib.js +2 -1
  45. package/dist/es/jest-lib.js.map +1 -1
  46. package/dist/es/jest.d.ts +1 -1
  47. package/dist/es/jest.js +3 -1
  48. package/dist/es/jest.js.map +1 -1
  49. package/dist/es/meta-helper.d.ts +27 -0
  50. package/dist/es/meta-helper.js +61 -0
  51. package/dist/es/meta-helper.js.map +1 -0
  52. package/dist/es/rules-helper.d.ts +45 -0
  53. package/dist/es/rules-helper.js +398 -0
  54. package/dist/es/rules-helper.js.map +1 -0
  55. package/dist/es/test-utils.d.ts +1 -1
  56. package/elements/html5.js +1 -2119
  57. package/package.json +15 -9
  58. package/elements/README.md +0 -49
  59. package/elements/entities.json +0 -1724
package/elements/html5.js CHANGED
@@ -1,2119 +1 @@
1
- /* eslint-disable sonarjs/no-duplicate-string */
2
-
3
- const { defineMetadata, metadataHelper, DynamicValue } = require("html-validate");
4
-
5
- const { allowedIfAttributeIsPresent, allowedIfAttributeIsAbsent, allowedIfAttributeHasValue } =
6
- metadataHelper;
7
-
8
- module.exports = defineMetadata({
9
- "*": {
10
- attributes: {
11
- contenteditable: {
12
- omit: true,
13
- enum: ["true", "false"],
14
- },
15
- contextmenu: {
16
- deprecated: true,
17
- },
18
- dir: {
19
- enum: ["ltr", "rtl", "auto"],
20
- },
21
- draggable: {
22
- enum: ["true", "false"],
23
- },
24
- hidden: {
25
- boolean: true,
26
- },
27
- id: {
28
- enum: ["/\\S+/"],
29
- },
30
- tabindex: {
31
- enum: ["/-?\\d+/"],
32
- },
33
- },
34
- },
35
-
36
- a: {
37
- flow: true,
38
- phrasing: true,
39
- interactive: true,
40
- transparent: true,
41
- attributes: {
42
- charset: {
43
- deprecated: true,
44
- },
45
- coords: {
46
- deprecated: true,
47
- },
48
- datafld: {
49
- deprecated: true,
50
- },
51
- datasrc: {
52
- deprecated: true,
53
- },
54
- download: {
55
- allowed: allowedIfAttributeIsPresent("href"),
56
- omit: true,
57
- enum: ["/.+/"],
58
- },
59
- href: {
60
- enum: ["/.*/"],
61
- },
62
- hreflang: {
63
- allowed: allowedIfAttributeIsPresent("href"),
64
- },
65
- itemprop: {
66
- allowed: allowedIfAttributeIsPresent("href"),
67
- },
68
- methods: {
69
- deprecated: true,
70
- },
71
- name: {
72
- deprecated: true,
73
- },
74
- ping: {
75
- allowed: allowedIfAttributeIsPresent("href"),
76
- },
77
- referrerpolicy: {
78
- allowed: allowedIfAttributeIsPresent("href"),
79
- },
80
- rel: {
81
- allowed: allowedIfAttributeIsPresent("href"),
82
- },
83
- shape: {
84
- deprecated: true,
85
- },
86
- target: {
87
- allowed: allowedIfAttributeIsPresent("href"),
88
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"],
89
- },
90
- type: {
91
- allowed: allowedIfAttributeIsPresent("href"),
92
- },
93
- urn: {
94
- deprecated: true,
95
- },
96
- },
97
- permittedDescendants: [{ exclude: "@interactive" }],
98
- },
99
-
100
- abbr: {
101
- flow: true,
102
- phrasing: true,
103
- permittedContent: ["@phrasing"],
104
- },
105
-
106
- acronym: {
107
- deprecated: {
108
- message: "use <abbr> instead",
109
- documentation: "`<abbr>` can be used as a replacement.",
110
- source: "html5",
111
- },
112
- },
113
-
114
- address: {
115
- flow: true,
116
- permittedContent: ["@flow"],
117
- permittedDescendants: [{ exclude: ["address", "header", "footer", "@heading", "@sectioning"] }],
118
- },
119
-
120
- applet: {
121
- deprecated: {
122
- source: "html5",
123
- },
124
- attributes: {
125
- datafld: {
126
- deprecated: true,
127
- },
128
- datasrc: {
129
- deprecated: true,
130
- },
131
- },
132
- },
133
-
134
- area: {
135
- flow: ["isDescendant", "map"],
136
- phrasing: ["isDescendant", "map"],
137
- void: true,
138
- attributes: {
139
- alt: {},
140
- coords: {
141
- allowed(node) {
142
- const attr = node.getAttribute("shape");
143
- if (attr && attr.valueMatches("default", false)) {
144
- return `cannot be used when "shape" attribute is "default"`;
145
- } else {
146
- return null;
147
- }
148
- },
149
- },
150
- download: {
151
- allowed: allowedIfAttributeIsPresent("href"),
152
- },
153
- nohref: {
154
- deprecated: true,
155
- },
156
- itemprop: {
157
- allowed: allowedIfAttributeIsPresent("href"),
158
- },
159
- ping: {
160
- allowed: allowedIfAttributeIsPresent("href"),
161
- },
162
- referrerpolicy: {
163
- allowed: allowedIfAttributeIsPresent("href"),
164
- },
165
- rel: {
166
- allowed: allowedIfAttributeIsPresent("href"),
167
- },
168
- shape: {
169
- allowed(node) {
170
- const attr = node.getAttribute("shape");
171
- if (!attr || attr.value instanceof DynamicValue) {
172
- return null;
173
- }
174
- const shape = attr.value || "rect";
175
- switch (shape) {
176
- case "circ":
177
- case "circle":
178
- case "poly":
179
- case "polygon":
180
- case "rect":
181
- case "rectangle":
182
- return allowedIfAttributeIsPresent("coords")(node);
183
- }
184
- return null;
185
- },
186
- enum: ["rect", "circle", "poly", "default"],
187
- },
188
- target: {
189
- allowed: allowedIfAttributeIsPresent("href"),
190
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"],
191
- },
192
- },
193
- requiredAncestors: ["map"],
194
- },
195
-
196
- article: {
197
- flow: true,
198
- sectioning: true,
199
- permittedContent: ["@flow"],
200
- permittedDescendants: [{ exclude: ["main"] }],
201
- },
202
-
203
- aside: {
204
- flow: true,
205
- sectioning: true,
206
- permittedContent: ["@flow"],
207
- permittedDescendants: [{ exclude: ["main"] }],
208
- },
209
-
210
- audio: {
211
- flow: true,
212
- phrasing: true,
213
- embedded: true,
214
- interactive: ["hasAttribute", "controls"],
215
- transparent: ["@flow"],
216
- attributes: {
217
- crossorigin: {
218
- omit: true,
219
- enum: ["anonymous", "use-credentials"],
220
- },
221
- itemprop: {
222
- allowed: allowedIfAttributeIsPresent("src"),
223
- },
224
- preload: {
225
- omit: true,
226
- enum: ["none", "metadata", "auto"],
227
- },
228
- },
229
- permittedContent: ["@flow", "track", "source"],
230
- permittedDescendants: [{ exclude: ["audio", "video"] }],
231
- permittedOrder: ["source", "track", "@flow"],
232
- },
233
-
234
- b: {
235
- flow: true,
236
- phrasing: true,
237
- permittedContent: ["@phrasing"],
238
- },
239
-
240
- base: {
241
- metadata: true,
242
- void: true,
243
- permittedParent: ["head"],
244
- },
245
-
246
- basefont: {
247
- deprecated: {
248
- message: "use CSS instead",
249
- documentation: "Use CSS `font-size` property instead.",
250
- source: "html4",
251
- },
252
- },
253
-
254
- bdi: {
255
- flow: true,
256
- phrasing: true,
257
- permittedContent: ["@phrasing"],
258
- },
259
-
260
- bdo: {
261
- flow: true,
262
- phrasing: true,
263
- permittedContent: ["@phrasing"],
264
- },
265
-
266
- bgsound: {
267
- deprecated: {
268
- message: "use <audio> instead",
269
- documentation:
270
- "Use the `<audio>` element instead but consider accessibility concerns with autoplaying sounds.",
271
- source: "non-standard",
272
- },
273
- },
274
-
275
- big: {
276
- deprecated: {
277
- message: "use CSS instead",
278
- documentation: "Use CSS `font-size` property instead.",
279
- source: "html5",
280
- },
281
- },
282
-
283
- blink: {
284
- deprecated: {
285
- documentation:
286
- "`<blink>` has no direct replacement and blinking text is frowned upon by accessibility standards.",
287
- source: "non-standard",
288
- },
289
- },
290
-
291
- blockquote: {
292
- flow: true,
293
- sectioning: true,
294
- permittedContent: ["@flow"],
295
- },
296
-
297
- body: {
298
- permittedContent: ["@flow"],
299
- permittedParent: ["html"],
300
- attributes: {
301
- alink: {
302
- deprecated: true,
303
- },
304
- background: {
305
- deprecated: true,
306
- },
307
- bgcolor: {
308
- deprecated: true,
309
- },
310
- link: {
311
- deprecated: true,
312
- },
313
- marginbottom: {
314
- deprecated: true,
315
- },
316
- marginheight: {
317
- deprecated: true,
318
- },
319
- marginleft: {
320
- deprecated: true,
321
- },
322
- marginright: {
323
- deprecated: true,
324
- },
325
- margintop: {
326
- deprecated: true,
327
- },
328
- marginwidth: {
329
- deprecated: true,
330
- },
331
- text: {
332
- deprecated: true,
333
- },
334
- vlink: {
335
- deprecated: true,
336
- },
337
- },
338
- },
339
-
340
- br: {
341
- flow: true,
342
- phrasing: true,
343
- void: true,
344
- attributes: {
345
- clear: {
346
- deprecated: true,
347
- },
348
- },
349
- },
350
-
351
- button: {
352
- flow: true,
353
- phrasing: true,
354
- interactive: true,
355
- labelable: true,
356
- attributes: {
357
- autofocus: {
358
- boolean: true,
359
- },
360
- datafld: {
361
- deprecated: true,
362
- },
363
- dataformatas: {
364
- deprecated: true,
365
- },
366
- datasrc: {
367
- deprecated: true,
368
- },
369
- disabled: {
370
- boolean: true,
371
- },
372
- formaction: {
373
- allowed: allowedIfAttributeHasValue("type", ["submit"], { defaultValue: "submit" }),
374
- },
375
- formenctype: {
376
- allowed: allowedIfAttributeHasValue("type", ["submit"], { defaultValue: "submit" }),
377
- },
378
- formmethod: {
379
- allowed: allowedIfAttributeHasValue("type", ["submit"], { defaultValue: "submit" }),
380
- enum: ["get", "post", "dialog"],
381
- },
382
- formnovalidate: {
383
- allowed: allowedIfAttributeHasValue("type", ["submit"], { defaultValue: "submit" }),
384
- boolean: true,
385
- },
386
- formtarget: {
387
- allowed: allowedIfAttributeHasValue("type", ["submit"], { defaultValue: "submit" }),
388
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"],
389
- },
390
- type: {
391
- required: true,
392
- enum: ["submit", "reset", "button"],
393
- },
394
- },
395
- permittedContent: ["@phrasing"],
396
- permittedDescendants: [{ exclude: ["@interactive"] }],
397
- textContent: "accessible",
398
- },
399
-
400
- canvas: {
401
- flow: true,
402
- phrasing: true,
403
- embedded: true,
404
- transparent: true,
405
- },
406
-
407
- caption: {
408
- permittedContent: ["@flow"],
409
- permittedDescendants: [{ exclude: ["table"] }],
410
- attributes: {
411
- align: {
412
- deprecated: true,
413
- },
414
- },
415
- },
416
-
417
- center: {
418
- deprecated: {
419
- message: "use CSS instead",
420
- documentation: "Use the CSS `text-align` or `margin: auto` properties instead.",
421
- source: "html4",
422
- },
423
- },
424
-
425
- cite: {
426
- flow: true,
427
- phrasing: true,
428
- permittedContent: ["@phrasing"],
429
- },
430
-
431
- code: {
432
- flow: true,
433
- phrasing: true,
434
- permittedContent: ["@phrasing"],
435
- },
436
-
437
- col: {
438
- attributes: {
439
- align: {
440
- deprecated: true,
441
- },
442
- char: {
443
- deprecated: true,
444
- },
445
- charoff: {
446
- deprecated: true,
447
- },
448
- span: {
449
- enum: ["/\\d+/"],
450
- },
451
- valign: {
452
- deprecated: true,
453
- },
454
- width: {
455
- deprecated: true,
456
- },
457
- },
458
- void: true,
459
- },
460
-
461
- colgroup: {
462
- implicitClosed: ["colgroup"],
463
- attributes: {
464
- span: {
465
- enum: ["/\\d+/"],
466
- },
467
- },
468
- permittedContent: ["col", "template"],
469
- },
470
-
471
- data: {
472
- flow: true,
473
- phrasing: true,
474
- permittedContent: ["@phrasing"],
475
- },
476
-
477
- datalist: {
478
- flow: true,
479
- phrasing: true,
480
- permittedContent: ["@phrasing", "option"],
481
- },
482
-
483
- dd: {
484
- implicitClosed: ["dd", "dt"],
485
- permittedContent: ["@flow"],
486
- requiredAncestors: ["dl > dd", "dl > div > dd"],
487
- },
488
-
489
- del: {
490
- flow: true,
491
- phrasing: true,
492
- transparent: true,
493
- },
494
-
495
- details: {
496
- flow: true,
497
- sectioning: true,
498
- interactive: true,
499
- attributes: {
500
- open: {
501
- boolean: true,
502
- },
503
- },
504
- permittedContent: ["summary", "@flow"],
505
- permittedOrder: ["summary", "@flow"],
506
- requiredContent: ["summary"],
507
- },
508
-
509
- dfn: {
510
- flow: true,
511
- phrasing: true,
512
- permittedContent: ["@phrasing"],
513
- permittedDescendants: [{ exclude: ["dfn"] }],
514
- },
515
-
516
- dialog: {
517
- flow: true,
518
- permittedContent: ["@flow"],
519
- attributes: {
520
- open: {
521
- boolean: true,
522
- },
523
- },
524
- },
525
-
526
- dir: {
527
- deprecated: {
528
- documentation:
529
- "The non-standard `<dir>` element has no direct replacement but MDN recommends replacing with `<ul>` and CSS.",
530
- source: "html4",
531
- },
532
- },
533
-
534
- div: {
535
- flow: true,
536
- permittedContent: ["@flow", "dt", "dd"],
537
- attributes: {
538
- align: {
539
- deprecated: true,
540
- },
541
- datafld: {
542
- deprecated: true,
543
- },
544
- dataformatas: {
545
- deprecated: true,
546
- },
547
- datasrc: {
548
- deprecated: true,
549
- },
550
- },
551
- },
552
-
553
- dl: {
554
- flow: true,
555
- permittedContent: ["@script", "dt", "dd", "div"],
556
- attributes: {
557
- compact: {
558
- deprecated: true,
559
- },
560
- },
561
- },
562
-
563
- dt: {
564
- implicitClosed: ["dd", "dt"],
565
- permittedContent: ["@flow"],
566
- permittedDescendants: [{ exclude: ["header", "footer", "@sectioning", "@heading"] }],
567
- requiredAncestors: ["dl > dt", "dl > div > dt"],
568
- },
569
-
570
- em: {
571
- flow: true,
572
- phrasing: true,
573
- permittedContent: ["@phrasing"],
574
- },
575
-
576
- embed: {
577
- flow: true,
578
- phrasing: true,
579
- embedded: true,
580
- interactive: true,
581
- void: true,
582
- attributes: {
583
- src: {
584
- required: true,
585
- enum: ["/.+/"],
586
- },
587
- title: {
588
- required: true,
589
- },
590
- },
591
- },
592
-
593
- fieldset: {
594
- flow: true,
595
- attributes: {
596
- datafld: {
597
- deprecated: true,
598
- },
599
- disabled: {
600
- boolean: true,
601
- },
602
- },
603
- permittedContent: ["@flow", "legend?"],
604
- permittedOrder: ["legend", "@flow"],
605
- },
606
-
607
- figcaption: {
608
- permittedContent: ["@flow"],
609
- },
610
-
611
- figure: {
612
- flow: true,
613
- permittedContent: ["@flow", "figcaption?"],
614
- permittedOrder: ["figcaption", "@flow", "figcaption"],
615
- },
616
-
617
- font: {
618
- deprecated: {
619
- message: "use CSS instead",
620
- documentation: "Use CSS font properties instead.",
621
- source: "html4",
622
- },
623
- },
624
-
625
- footer: {
626
- flow: true,
627
- permittedContent: ["@flow"],
628
- permittedDescendants: [{ exclude: ["header", "footer", "main"] }],
629
- },
630
-
631
- form: {
632
- flow: true,
633
- form: true,
634
- attributes: {
635
- action: {
636
- enum: [/^\s*\S+\s*$/],
637
- },
638
- accept: {
639
- deprecated: true,
640
- },
641
- autocomplete: {
642
- enum: ["on", "off"],
643
- },
644
- method: {
645
- enum: ["get", "post", "dialog"],
646
- },
647
- novalidate: {
648
- boolean: true,
649
- },
650
- target: {
651
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"],
652
- },
653
- },
654
- permittedContent: ["@flow"],
655
- permittedDescendants: [{ exclude: ["@form"] }],
656
- },
657
-
658
- frame: {
659
- deprecated: {
660
- documentation:
661
- "The `<frame>` element can be replaced with the `<iframe>` element but a better solution is to remove usage of frames entirely.",
662
- source: "html5",
663
- },
664
- attributes: {
665
- datafld: {
666
- deprecated: true,
667
- },
668
- datasrc: {
669
- deprecated: true,
670
- },
671
- title: {
672
- required: true,
673
- },
674
- },
675
- },
676
-
677
- frameset: {
678
- deprecated: {
679
- documentation:
680
- "The `<frameset>` element can be replaced with the `<iframe>` element but a better solution is to remove usage of frames entirely.",
681
- source: "html5",
682
- },
683
- },
684
-
685
- h1: {
686
- flow: true,
687
- heading: true,
688
- permittedContent: ["@phrasing"],
689
- attributes: {
690
- align: {
691
- deprecated: true,
692
- },
693
- },
694
- },
695
-
696
- h2: {
697
- flow: true,
698
- heading: true,
699
- permittedContent: ["@phrasing"],
700
- attributes: {
701
- align: {
702
- deprecated: true,
703
- },
704
- },
705
- },
706
-
707
- h3: {
708
- flow: true,
709
- heading: true,
710
- permittedContent: ["@phrasing"],
711
- attributes: {
712
- align: {
713
- deprecated: true,
714
- },
715
- },
716
- },
717
-
718
- h4: {
719
- flow: true,
720
- heading: true,
721
- permittedContent: ["@phrasing"],
722
- attributes: {
723
- align: {
724
- deprecated: true,
725
- },
726
- },
727
- },
728
-
729
- h5: {
730
- flow: true,
731
- heading: true,
732
- permittedContent: ["@phrasing"],
733
- attributes: {
734
- align: {
735
- deprecated: true,
736
- },
737
- },
738
- },
739
-
740
- h6: {
741
- flow: true,
742
- heading: true,
743
- permittedContent: ["@phrasing"],
744
- attributes: {
745
- align: {
746
- deprecated: true,
747
- },
748
- },
749
- },
750
-
751
- head: {
752
- permittedContent: ["base?", "title?", "@meta"],
753
- permittedParent: ["html"],
754
- requiredContent: ["title"],
755
- attributes: {
756
- profile: {
757
- deprecated: true,
758
- },
759
- },
760
- },
761
-
762
- header: {
763
- flow: true,
764
- permittedContent: ["@flow"],
765
- permittedDescendants: [{ exclude: ["header", "footer", "main"] }],
766
- },
767
-
768
- hgroup: {
769
- deprecated: true,
770
- },
771
-
772
- hr: {
773
- flow: true,
774
- void: true,
775
- attributes: {
776
- align: {
777
- deprecated: true,
778
- },
779
- color: {
780
- deprecated: true,
781
- },
782
- noshade: {
783
- deprecated: true,
784
- },
785
- size: {
786
- deprecated: true,
787
- },
788
- width: {
789
- deprecated: true,
790
- },
791
- },
792
- },
793
-
794
- html: {
795
- permittedContent: ["head?", "body?"],
796
- permittedOrder: ["head", "body"],
797
- requiredContent: ["head", "body"],
798
- attributes: {
799
- lang: {
800
- required: true,
801
- },
802
- version: {
803
- deprecated: true,
804
- },
805
- },
806
- },
807
-
808
- i: {
809
- flow: true,
810
- phrasing: true,
811
- permittedContent: ["@phrasing"],
812
- },
813
-
814
- iframe: {
815
- flow: true,
816
- phrasing: true,
817
- embedded: true,
818
- interactive: true,
819
- attributes: {
820
- align: {
821
- deprecated: true,
822
- },
823
- allowtransparency: {
824
- deprecated: true,
825
- },
826
- datafld: {
827
- deprecated: true,
828
- },
829
- datasrc: {
830
- deprecated: true,
831
- },
832
- frameborder: {
833
- deprecated: true,
834
- },
835
- hspace: {
836
- deprecated: true,
837
- },
838
- marginheight: {
839
- deprecated: true,
840
- },
841
- marginwidth: {
842
- deprecated: true,
843
- },
844
- scrolling: {
845
- deprecated: true,
846
- },
847
- src: {
848
- enum: ["/.+/"],
849
- },
850
- title: {
851
- required: true,
852
- },
853
- vspace: {
854
- deprecated: true,
855
- },
856
- },
857
- permittedContent: [],
858
- },
859
-
860
- img: {
861
- flow: true,
862
- phrasing: true,
863
- embedded: true,
864
- interactive: ["hasAttribute", "usemap"],
865
- void: true,
866
- attributes: {
867
- align: {
868
- deprecated: true,
869
- },
870
- border: {
871
- deprecated: true,
872
- },
873
- crossorigin: {
874
- omit: true,
875
- enum: ["anonymous", "use-credentials"],
876
- },
877
- datafld: {
878
- deprecated: true,
879
- },
880
- datasrc: {
881
- deprecated: true,
882
- },
883
- decoding: {
884
- enum: ["sync", "async", "auto"],
885
- },
886
- hspace: {
887
- deprecated: true,
888
- },
889
- ismap: {
890
- boolean: true,
891
- },
892
- lowsrc: {
893
- deprecated: true,
894
- },
895
- name: {
896
- deprecated: true,
897
- },
898
- src: {
899
- required: true,
900
- enum: ["/.+/"],
901
- },
902
- srcset: {
903
- enum: ["/[^]+/"],
904
- },
905
- vspace: {
906
- deprecated: true,
907
- },
908
- },
909
- },
910
-
911
- input: {
912
- flow: true,
913
- phrasing: true,
914
- interactive: ["matchAttribute", ["type", "!=", "hidden"]],
915
- void: true,
916
- labelable: ["matchAttribute", ["type", "!=", "hidden"]],
917
- attributes: {
918
- align: {
919
- deprecated: true,
920
- },
921
- autofocus: {
922
- boolean: true,
923
- },
924
- capture: {
925
- omit: true,
926
- enum: ["environment", "user"],
927
- },
928
- checked: {
929
- boolean: true,
930
- },
931
- datafld: {
932
- deprecated: true,
933
- },
934
- dataformatas: {
935
- deprecated: true,
936
- },
937
- datasrc: {
938
- deprecated: true,
939
- },
940
- disabled: {
941
- boolean: true,
942
- },
943
- formaction: {
944
- allowed: allowedIfAttributeHasValue("type", ["submit", "image"], {
945
- defaultValue: "submit",
946
- }),
947
- },
948
- formenctype: {
949
- allowed: allowedIfAttributeHasValue("type", ["submit", "image"], {
950
- defaultValue: "submit",
951
- }),
952
- },
953
- formmethod: {
954
- allowed: allowedIfAttributeHasValue("type", ["submit", "image"], {
955
- defaultValue: "submit",
956
- }),
957
- enum: ["get", "post", "dialog"],
958
- },
959
- formnovalidate: {
960
- allowed: allowedIfAttributeHasValue("type", ["submit", "image"], {
961
- defaultValue: "submit",
962
- }),
963
- boolean: true,
964
- },
965
- formtarget: {
966
- allowed: allowedIfAttributeHasValue("type", ["submit", "image"], {
967
- defaultValue: "submit",
968
- }),
969
- enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"],
970
- },
971
- hspace: {
972
- deprecated: true,
973
- },
974
- inputmode: {
975
- enum: ["none", "text", "decimal", "numeric", "tel", "search", "email", "url"],
976
- },
977
- ismap: {
978
- deprecated: true,
979
- },
980
- multiple: {
981
- boolean: true,
982
- },
983
- readonly: {
984
- boolean: true,
985
- },
986
- required: {
987
- boolean: true,
988
- },
989
- spellcheck: {
990
- enum: ["default", "false", "true"],
991
- },
992
- type: {
993
- required: true,
994
- enum: [
995
- "button",
996
- "checkbox",
997
- "color",
998
- "date",
999
- "datetime-local",
1000
- "email",
1001
- "file",
1002
- "hidden",
1003
- "image",
1004
- "month",
1005
- "number",
1006
- "password",
1007
- "radio",
1008
- "range",
1009
- "reset",
1010
- "search",
1011
- "submit",
1012
- "tel",
1013
- "text",
1014
- "time",
1015
- "url",
1016
- "week",
1017
- ],
1018
- },
1019
- usemap: {
1020
- deprecated: true,
1021
- },
1022
- vspace: {
1023
- deprecated: true,
1024
- },
1025
- },
1026
- },
1027
-
1028
- ins: {
1029
- flow: true,
1030
- phrasing: true,
1031
- transparent: true,
1032
- },
1033
-
1034
- isindex: {
1035
- deprecated: {
1036
- source: "html4",
1037
- },
1038
- },
1039
-
1040
- kbd: {
1041
- flow: true,
1042
- phrasing: true,
1043
- permittedContent: ["@phrasing"],
1044
- },
1045
-
1046
- keygen: {
1047
- flow: true,
1048
- phrasing: true,
1049
- interactive: true,
1050
- void: true,
1051
- labelable: true,
1052
- deprecated: true,
1053
- },
1054
-
1055
- label: {
1056
- flow: true,
1057
- phrasing: true,
1058
- interactive: true,
1059
- permittedContent: ["@phrasing"],
1060
- permittedDescendants: [{ exclude: ["label"] }],
1061
- attributes: {
1062
- datafld: {
1063
- deprecated: true,
1064
- },
1065
- dataformatas: {
1066
- deprecated: true,
1067
- },
1068
- datasrc: {
1069
- deprecated: true,
1070
- },
1071
- },
1072
- },
1073
-
1074
- legend: {
1075
- permittedContent: ["@phrasing", "@heading"],
1076
- attributes: {
1077
- align: {
1078
- deprecated: true,
1079
- },
1080
- datafld: {
1081
- deprecated: true,
1082
- },
1083
- dataformatas: {
1084
- deprecated: true,
1085
- },
1086
- datasrc: {
1087
- deprecated: true,
1088
- },
1089
- },
1090
- },
1091
-
1092
- li: {
1093
- implicitClosed: ["li"],
1094
- permittedContent: ["@flow"],
1095
- permittedParent: ["ul", "ol", "menu", "template"],
1096
- attributes: {
1097
- type: {
1098
- deprecated: true,
1099
- },
1100
- },
1101
- },
1102
-
1103
- link: {
1104
- metadata: true,
1105
- void: true,
1106
- attributes: {
1107
- as: {
1108
- allowed: allowedIfAttributeHasValue("rel", ["preload", "modulepreload"]),
1109
- enum: [
1110
- "audio",
1111
- "audioworklet",
1112
- "document",
1113
- "embed",
1114
- "fetch",
1115
- "font",
1116
- "frame",
1117
- "iframe",
1118
- "image",
1119
- "manifest",
1120
- "object",
1121
- "paintworklet",
1122
- "report",
1123
- "script",
1124
- "serviceworker",
1125
- "sharedworker",
1126
- "style",
1127
- "track",
1128
- "video",
1129
- "webidentity",
1130
- "worker",
1131
- "xslt",
1132
- ],
1133
- },
1134
- blocking: {
1135
- allowed: allowedIfAttributeHasValue("rel", ["stylesheet", "preload", "modulepreload"]),
1136
- list: true,
1137
- enum: ["render"],
1138
- },
1139
- charset: {
1140
- deprecated: true,
1141
- },
1142
- crossorigin: {
1143
- omit: true,
1144
- enum: ["anonymous", "use-credentials"],
1145
- },
1146
- disabled: {
1147
- allowed: allowedIfAttributeHasValue("rel", ["stylesheet"]),
1148
- boolean: true,
1149
- },
1150
- href: {
1151
- required: true,
1152
- enum: ["/.+/"],
1153
- },
1154
- integrity: {
1155
- allowed: allowedIfAttributeHasValue("rel", ["stylesheet", "preload", "modulepreload"]),
1156
- enum: ["/.+/"],
1157
- },
1158
- methods: {
1159
- deprecated: true,
1160
- },
1161
- target: {
1162
- deprecated: true,
1163
- },
1164
- urn: {
1165
- deprecated: true,
1166
- },
1167
- },
1168
- },
1169
-
1170
- listing: {
1171
- deprecated: {
1172
- source: "html32",
1173
- },
1174
- },
1175
-
1176
- main: {
1177
- flow: true,
1178
- },
1179
-
1180
- map: {
1181
- flow: true,
1182
- phrasing: true,
1183
- transparent: true,
1184
- attributes: {
1185
- name: {
1186
- required: true,
1187
- enum: ["/\\S+/"],
1188
- },
1189
- },
1190
- },
1191
-
1192
- mark: {
1193
- flow: true,
1194
- phrasing: true,
1195
- permittedContent: ["@phrasing"],
1196
- },
1197
-
1198
- marquee: {
1199
- deprecated: {
1200
- documentation:
1201
- "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.",
1202
- source: "html5",
1203
- },
1204
- attributes: {
1205
- datafld: {
1206
- deprecated: true,
1207
- },
1208
- dataformatas: {
1209
- deprecated: true,
1210
- },
1211
- datasrc: {
1212
- deprecated: true,
1213
- },
1214
- },
1215
- },
1216
-
1217
- math: {
1218
- flow: true,
1219
- foreign: true,
1220
- phrasing: true,
1221
- embedded: true,
1222
- attributes: {
1223
- align: {
1224
- deprecated: true,
1225
- },
1226
- dir: {
1227
- enum: ["ltr", "rtl"],
1228
- },
1229
- display: {
1230
- enum: ["block", "inline"],
1231
- },
1232
- hspace: {
1233
- deprecated: true,
1234
- },
1235
- name: {
1236
- deprecated: true,
1237
- },
1238
- overflow: {
1239
- enum: ["linebreak", "scroll", "elide", "truncate", "scale"],
1240
- },
1241
- vspace: {
1242
- deprecated: true,
1243
- },
1244
- },
1245
- },
1246
-
1247
- menu: {
1248
- flow: true,
1249
- permittedContent: ["@script", "li"],
1250
- },
1251
-
1252
- meta: {
1253
- flow: ["hasAttribute", "itemprop"],
1254
- phrasing: ["hasAttribute", "itemprop"],
1255
- metadata: true,
1256
- void: true,
1257
- attributes: {
1258
- charset: {
1259
- enum: ["utf-8"],
1260
- },
1261
- content: {
1262
- allowed: allowedIfAttributeIsPresent("name", "http-equiv", "itemprop"),
1263
- },
1264
- itemprop: {
1265
- allowed: allowedIfAttributeIsAbsent("http-equiv", "name"),
1266
- },
1267
- name: {
1268
- allowed: allowedIfAttributeIsAbsent("http-equiv", "itemprop"),
1269
- },
1270
- "http-equiv": {
1271
- allowed: allowedIfAttributeIsAbsent("name", "itemprop"),
1272
- },
1273
- scheme: {
1274
- deprecated: true,
1275
- },
1276
- },
1277
- },
1278
-
1279
- meter: {
1280
- flow: true,
1281
- phrasing: true,
1282
- labelable: true,
1283
- permittedContent: ["@phrasing"],
1284
- permittedDescendants: [{ exclude: "meter" }],
1285
- },
1286
-
1287
- multicol: {
1288
- deprecated: {
1289
- message: "use CSS instead",
1290
- documentation: "Use CSS columns instead.",
1291
- source: "html5",
1292
- },
1293
- },
1294
-
1295
- nav: {
1296
- flow: true,
1297
- sectioning: true,
1298
- permittedContent: ["@flow"],
1299
- permittedDescendants: [{ exclude: "main" }],
1300
- },
1301
-
1302
- nextid: {
1303
- deprecated: {
1304
- source: "html32",
1305
- },
1306
- },
1307
-
1308
- nobr: {
1309
- deprecated: {
1310
- message: "use CSS instead",
1311
- documentation: "Use CSS `white-space` property instead.",
1312
- source: "non-standard",
1313
- },
1314
- },
1315
-
1316
- noembed: {
1317
- deprecated: {
1318
- source: "non-standard",
1319
- },
1320
- },
1321
-
1322
- noframes: {
1323
- deprecated: {
1324
- source: "html5",
1325
- },
1326
- },
1327
-
1328
- noscript: {
1329
- metadata: true,
1330
- flow: true,
1331
- phrasing: true,
1332
- transparent: true,
1333
- permittedDescendants: [{ exclude: "noscript" }],
1334
- },
1335
-
1336
- object: {
1337
- flow: true,
1338
- phrasing: true,
1339
- embedded: true,
1340
- interactive: ["hasAttribute", "usemap"],
1341
- transparent: true,
1342
- attributes: {
1343
- align: {
1344
- deprecated: true,
1345
- },
1346
- archive: {
1347
- deprecated: true,
1348
- },
1349
- blocking: {
1350
- list: true,
1351
- enum: ["render"],
1352
- },
1353
- border: {
1354
- deprecated: true,
1355
- },
1356
- classid: {
1357
- deprecated: true,
1358
- },
1359
- code: {
1360
- deprecated: true,
1361
- },
1362
- codebase: {
1363
- deprecated: true,
1364
- },
1365
- codetype: {
1366
- deprecated: true,
1367
- },
1368
- data: {
1369
- enum: ["/.+/"],
1370
- required: true,
1371
- },
1372
- datafld: {
1373
- deprecated: true,
1374
- },
1375
- dataformatas: {
1376
- deprecated: true,
1377
- },
1378
- datasrc: {
1379
- deprecated: true,
1380
- },
1381
- declare: {
1382
- deprecated: true,
1383
- },
1384
- hspace: {
1385
- deprecated: true,
1386
- },
1387
- name: {
1388
- enum: ["/[^_].*/"],
1389
- },
1390
- standby: {
1391
- deprecated: true,
1392
- },
1393
- vspace: {
1394
- deprecated: true,
1395
- },
1396
- },
1397
- permittedContent: ["param", "@flow"],
1398
- permittedOrder: ["param", "@flow"],
1399
- },
1400
-
1401
- ol: {
1402
- flow: true,
1403
- attributes: {
1404
- compact: {
1405
- deprecated: true,
1406
- },
1407
- reversed: {
1408
- boolean: true,
1409
- },
1410
- type: {
1411
- enum: ["a", "A", "i", "I", "1"],
1412
- },
1413
- },
1414
- permittedContent: ["@script", "li"],
1415
- },
1416
-
1417
- optgroup: {
1418
- implicitClosed: ["optgroup"],
1419
- attributes: {
1420
- disabled: {
1421
- boolean: true,
1422
- },
1423
- },
1424
- permittedContent: ["@script", "option"],
1425
- },
1426
-
1427
- option: {
1428
- implicitClosed: ["option"],
1429
- attributes: {
1430
- dataformatas: {
1431
- deprecated: true,
1432
- },
1433
- datasrc: {
1434
- deprecated: true,
1435
- },
1436
- disabled: {
1437
- boolean: true,
1438
- },
1439
- name: {
1440
- deprecated: true,
1441
- },
1442
- selected: {
1443
- boolean: true,
1444
- },
1445
- },
1446
- permittedContent: [],
1447
- },
1448
-
1449
- output: {
1450
- flow: true,
1451
- phrasing: true,
1452
- labelable: true,
1453
- permittedContent: ["@phrasing"],
1454
- },
1455
-
1456
- p: {
1457
- flow: true,
1458
- implicitClosed: [
1459
- "address",
1460
- "article",
1461
- "aside",
1462
- "blockquote",
1463
- "div",
1464
- "dl",
1465
- "fieldset",
1466
- "footer",
1467
- "form",
1468
- "h1",
1469
- "h2",
1470
- "h3",
1471
- "h4",
1472
- "h5",
1473
- "h6",
1474
- "header",
1475
- "hgroup",
1476
- "hr",
1477
- "main",
1478
- "nav",
1479
- "ol",
1480
- "p",
1481
- "pre",
1482
- "section",
1483
- "table",
1484
- "ul",
1485
- ],
1486
- permittedContent: ["@phrasing"],
1487
- attributes: {
1488
- align: {
1489
- deprecated: true,
1490
- },
1491
- },
1492
- },
1493
-
1494
- param: {
1495
- void: true,
1496
- attributes: {
1497
- datafld: {
1498
- deprecated: true,
1499
- },
1500
- type: {
1501
- deprecated: true,
1502
- },
1503
- valuetype: {
1504
- deprecated: true,
1505
- },
1506
- },
1507
- },
1508
-
1509
- picture: {
1510
- flow: true,
1511
- phrasing: true,
1512
- embedded: true,
1513
- permittedContent: ["@script", "source", "img"],
1514
- permittedOrder: ["source", "img"],
1515
- },
1516
-
1517
- plaintext: {
1518
- deprecated: {
1519
- message: "use <pre> or CSS instead",
1520
- documentation: "Use the `<pre>` element or use CSS to set a monospace font.",
1521
- source: "html2",
1522
- },
1523
- },
1524
-
1525
- pre: {
1526
- flow: true,
1527
- permittedContent: ["@phrasing"],
1528
- attributes: {
1529
- width: {
1530
- deprecated: true,
1531
- },
1532
- },
1533
- },
1534
-
1535
- progress: {
1536
- flow: true,
1537
- phrasing: true,
1538
- labelable: true,
1539
- permittedContent: ["@phrasing"],
1540
- permittedDescendants: [{ exclude: "progress" }],
1541
- },
1542
-
1543
- q: {
1544
- flow: true,
1545
- phrasing: true,
1546
- permittedContent: ["@phrasing"],
1547
- },
1548
-
1549
- rb: {
1550
- implicitClosed: ["rb", "rt", "rtc", "rp"],
1551
- permittedContent: ["@phrasing"],
1552
- },
1553
-
1554
- rp: {
1555
- implicitClosed: ["rb", "rt", "rtc", "rp"],
1556
- permittedContent: ["@phrasing"],
1557
- },
1558
-
1559
- rt: {
1560
- implicitClosed: ["rb", "rt", "rtc", "rp"],
1561
- permittedContent: ["@phrasing"],
1562
- },
1563
-
1564
- rtc: {
1565
- implicitClosed: ["rb", "rtc", "rp"],
1566
- permittedContent: ["@phrasing", "rt"],
1567
- },
1568
-
1569
- ruby: {
1570
- flow: true,
1571
- phrasing: true,
1572
- permittedContent: ["@phrasing", "rb", "rp", "rt", "rtc"],
1573
- },
1574
-
1575
- s: {
1576
- flow: true,
1577
- phrasing: true,
1578
- permittedContent: ["@phrasing"],
1579
- },
1580
-
1581
- samp: {
1582
- flow: true,
1583
- phrasing: true,
1584
- permittedContent: ["@phrasing"],
1585
- },
1586
-
1587
- script: {
1588
- metadata: true,
1589
- flow: true,
1590
- phrasing: true,
1591
- scriptSupporting: true,
1592
- attributes: {
1593
- async: {
1594
- boolean: true,
1595
- },
1596
- crossorigin: {
1597
- omit: true,
1598
- enum: ["anonymous", "use-credentials"],
1599
- },
1600
- defer: {
1601
- boolean: true,
1602
- },
1603
- event: {
1604
- deprecated: true,
1605
- },
1606
- for: {
1607
- deprecated: true,
1608
- },
1609
- integrity: {
1610
- allowed: allowedIfAttributeIsPresent("src"),
1611
- enum: ["/.+/"],
1612
- },
1613
- language: {
1614
- deprecated: true,
1615
- },
1616
- nomodule: {
1617
- boolean: true,
1618
- },
1619
- src: {
1620
- enum: ["/.+/"],
1621
- },
1622
- },
1623
- },
1624
-
1625
- section: {
1626
- flow: true,
1627
- sectioning: true,
1628
- permittedContent: ["@flow"],
1629
- },
1630
-
1631
- select: {
1632
- flow: true,
1633
- phrasing: true,
1634
- interactive: true,
1635
- labelable: true,
1636
- attributes: {
1637
- autofocus: {
1638
- boolean: true,
1639
- },
1640
- disabled: {
1641
- boolean: true,
1642
- },
1643
- multiple: {
1644
- boolean: true,
1645
- },
1646
- required: {
1647
- boolean: true,
1648
- },
1649
- size: {
1650
- enum: ["/\\d+/"],
1651
- },
1652
- },
1653
- permittedContent: ["@script", "datasrc", "datafld", "dataformatas", "option", "optgroup"],
1654
- },
1655
-
1656
- slot: {
1657
- flow: true,
1658
- phrasing: true,
1659
- transparent: true,
1660
- },
1661
-
1662
- small: {
1663
- flow: true,
1664
- phrasing: true,
1665
- permittedContent: ["@phrasing"],
1666
- },
1667
-
1668
- source: {
1669
- void: true,
1670
- },
1671
-
1672
- spacer: {
1673
- deprecated: {
1674
- message: "use CSS instead",
1675
- documentation: "Use CSS margin or padding instead.",
1676
- source: "non-standard",
1677
- },
1678
- },
1679
-
1680
- span: {
1681
- flow: true,
1682
- phrasing: true,
1683
- permittedContent: ["@phrasing"],
1684
- attributes: {
1685
- datafld: {
1686
- deprecated: true,
1687
- },
1688
- dataformatas: {
1689
- deprecated: true,
1690
- },
1691
- datasrc: {
1692
- deprecated: true,
1693
- },
1694
- },
1695
- },
1696
-
1697
- strike: {
1698
- deprecated: {
1699
- message: "use <del> or <s> instead",
1700
- documentation: "Use the `<del>` or `<s>` element instead.",
1701
- source: "html5",
1702
- },
1703
- },
1704
-
1705
- strong: {
1706
- flow: true,
1707
- phrasing: true,
1708
- permittedContent: ["@phrasing"],
1709
- },
1710
-
1711
- style: {
1712
- metadata: true,
1713
- },
1714
-
1715
- sub: {
1716
- flow: true,
1717
- phrasing: true,
1718
- permittedContent: ["@phrasing"],
1719
- },
1720
-
1721
- summary: {
1722
- permittedContent: ["@phrasing", "@heading"],
1723
- },
1724
-
1725
- sup: {
1726
- flow: true,
1727
- phrasing: true,
1728
- permittedContent: ["@phrasing"],
1729
- },
1730
-
1731
- svg: {
1732
- flow: true,
1733
- foreign: true,
1734
- phrasing: true,
1735
- embedded: true,
1736
- },
1737
-
1738
- /* while not part of HTML 5 specification these two elements are handled as
1739
- * special cases to allow them as accessible text and to avoid issues with
1740
- * "no-unknown-elements" they are added here */
1741
- "svg:desc": {},
1742
- "svg:title": {},
1743
-
1744
- table: {
1745
- flow: true,
1746
- permittedContent: ["@script", "caption?", "colgroup", "tbody", "tfoot?", "thead?", "tr"],
1747
- permittedOrder: ["caption", "colgroup", "thead", "tbody", "tr", "tfoot"],
1748
- attributes: {
1749
- align: {
1750
- deprecated: true,
1751
- },
1752
- background: {
1753
- deprecated: true,
1754
- },
1755
- bgcolor: {
1756
- deprecated: true,
1757
- },
1758
- bordercolor: {
1759
- deprecated: true,
1760
- },
1761
- cellpadding: {
1762
- deprecated: true,
1763
- },
1764
- cellspacing: {
1765
- deprecated: true,
1766
- },
1767
- dataformatas: {
1768
- deprecated: true,
1769
- },
1770
- datapagesize: {
1771
- deprecated: true,
1772
- },
1773
- datasrc: {
1774
- deprecated: true,
1775
- },
1776
- frame: {
1777
- deprecated: true,
1778
- },
1779
- rules: {
1780
- deprecated: true,
1781
- },
1782
- summary: {
1783
- deprecated: true,
1784
- },
1785
- width: {
1786
- deprecated: true,
1787
- },
1788
- },
1789
- },
1790
-
1791
- tbody: {
1792
- implicitClosed: ["tbody", "tfoot"],
1793
- permittedContent: ["@script", "tr"],
1794
- attributes: {
1795
- align: {
1796
- deprecated: true,
1797
- },
1798
- background: {
1799
- deprecated: true,
1800
- },
1801
- char: {
1802
- deprecated: true,
1803
- },
1804
- charoff: {
1805
- deprecated: true,
1806
- },
1807
- valign: {
1808
- deprecated: true,
1809
- },
1810
- },
1811
- },
1812
-
1813
- td: {
1814
- flow: true,
1815
- implicitClosed: ["td", "th"],
1816
- attributes: {
1817
- align: {
1818
- deprecated: true,
1819
- },
1820
- axis: {
1821
- deprecated: true,
1822
- },
1823
- background: {
1824
- deprecated: true,
1825
- },
1826
- bgcolor: {
1827
- deprecated: true,
1828
- },
1829
- char: {
1830
- deprecated: true,
1831
- },
1832
- charoff: {
1833
- deprecated: true,
1834
- },
1835
- colspan: {
1836
- enum: ["/\\d+/"],
1837
- },
1838
- height: {
1839
- deprecated: true,
1840
- },
1841
- nowrap: {
1842
- deprecated: true,
1843
- },
1844
- rowspan: {
1845
- enum: ["/\\d+/"],
1846
- },
1847
- scope: {
1848
- deprecated: true,
1849
- },
1850
- valign: {
1851
- deprecated: true,
1852
- },
1853
- width: {
1854
- deprecated: true,
1855
- },
1856
- },
1857
- permittedContent: ["@flow"],
1858
- },
1859
-
1860
- template: {
1861
- metadata: true,
1862
- flow: true,
1863
- phrasing: true,
1864
- scriptSupporting: true,
1865
- },
1866
-
1867
- textarea: {
1868
- flow: true,
1869
- phrasing: true,
1870
- interactive: true,
1871
- labelable: true,
1872
- attributes: {
1873
- autocomplete: {
1874
- enum: ["on", "off"],
1875
- },
1876
- autofocus: {
1877
- boolean: true,
1878
- },
1879
- cols: {
1880
- enum: ["/\\d+/"],
1881
- },
1882
- datafld: {
1883
- deprecated: true,
1884
- },
1885
- datasrc: {
1886
- deprecated: true,
1887
- },
1888
- disabled: {
1889
- boolean: true,
1890
- },
1891
- maxlength: {
1892
- enum: ["/\\d+/"],
1893
- },
1894
- minlength: {
1895
- enum: ["/\\d+/"],
1896
- },
1897
- readonly: {
1898
- boolean: true,
1899
- },
1900
- required: {
1901
- boolean: true,
1902
- },
1903
- rows: {
1904
- enum: ["/\\d+/"],
1905
- },
1906
- spellcheck: {
1907
- enum: ["true", "default", "false"],
1908
- },
1909
- wrap: {
1910
- enum: ["hard", "soft"],
1911
- },
1912
- },
1913
- permittedContent: [],
1914
- },
1915
-
1916
- tfoot: {
1917
- implicitClosed: ["tbody"],
1918
- permittedContent: ["@script", "tr"],
1919
- attributes: {
1920
- align: {
1921
- deprecated: true,
1922
- },
1923
- background: {
1924
- deprecated: true,
1925
- },
1926
- char: {
1927
- deprecated: true,
1928
- },
1929
- charoff: {
1930
- deprecated: true,
1931
- },
1932
- valign: {
1933
- deprecated: true,
1934
- },
1935
- },
1936
- },
1937
-
1938
- th: {
1939
- flow: true,
1940
- implicitClosed: ["td", "th"],
1941
- attributes: {
1942
- align: {
1943
- deprecated: true,
1944
- },
1945
- axis: {
1946
- deprecated: true,
1947
- },
1948
- background: {
1949
- deprecated: true,
1950
- },
1951
- bgcolor: {
1952
- deprecated: true,
1953
- },
1954
- char: {
1955
- deprecated: true,
1956
- },
1957
- charoff: {
1958
- deprecated: true,
1959
- },
1960
- colspan: {
1961
- enum: ["/\\d+/"],
1962
- },
1963
- height: {
1964
- deprecated: true,
1965
- },
1966
- nowrap: {
1967
- deprecated: true,
1968
- },
1969
- rowspan: {
1970
- enum: ["/\\d+/"],
1971
- },
1972
- scope: {
1973
- required: true,
1974
- enum: ["row", "col", "rowgroup", "colgroup", "auto"],
1975
- },
1976
- valign: {
1977
- deprecated: true,
1978
- },
1979
- width: {
1980
- deprecated: true,
1981
- },
1982
- },
1983
- permittedContent: ["@flow"],
1984
- permittedDescendants: [{ exclude: ["header", "footer", "@sectioning", "@heading"] }],
1985
- },
1986
-
1987
- thead: {
1988
- implicitClosed: ["tbody", "tfoot"],
1989
- permittedContent: ["@script", "tr"],
1990
- attributes: {
1991
- align: {
1992
- deprecated: true,
1993
- },
1994
- background: {
1995
- deprecated: true,
1996
- },
1997
- char: {
1998
- deprecated: true,
1999
- },
2000
- charoff: {
2001
- deprecated: true,
2002
- },
2003
- valign: {
2004
- deprecated: true,
2005
- },
2006
- },
2007
- },
2008
-
2009
- time: {
2010
- flow: true,
2011
- phrasing: true,
2012
- permittedContent: ["@phrasing"],
2013
- },
2014
-
2015
- title: {
2016
- metadata: true,
2017
- permittedContent: [],
2018
- permittedParent: ["head"],
2019
- },
2020
-
2021
- tr: {
2022
- implicitClosed: ["tr"],
2023
- permittedContent: ["@script", "td", "th"],
2024
- attributes: {
2025
- align: {
2026
- deprecated: true,
2027
- },
2028
- background: {
2029
- deprecated: true,
2030
- },
2031
- bgcolor: {
2032
- deprecated: true,
2033
- },
2034
- char: {
2035
- deprecated: true,
2036
- },
2037
- charoff: {
2038
- deprecated: true,
2039
- },
2040
- valign: {
2041
- deprecated: true,
2042
- },
2043
- },
2044
- },
2045
-
2046
- track: {
2047
- void: true,
2048
- },
2049
-
2050
- tt: {
2051
- deprecated: {
2052
- documentation:
2053
- "Use a more semantically correct element such as `<code>`, `<var>` or `<pre>`.",
2054
- source: "html4",
2055
- },
2056
- },
2057
-
2058
- u: {
2059
- flow: true,
2060
- phrasing: true,
2061
- permittedContent: ["@phrasing"],
2062
- },
2063
-
2064
- ul: {
2065
- flow: true,
2066
- permittedContent: ["@script", "li"],
2067
- attributes: {
2068
- compact: {
2069
- deprecated: true,
2070
- },
2071
- type: {
2072
- deprecated: true,
2073
- },
2074
- },
2075
- },
2076
-
2077
- var: {
2078
- flow: true,
2079
- phrasing: true,
2080
- permittedContent: ["@phrasing"],
2081
- },
2082
-
2083
- video: {
2084
- flow: true,
2085
- phrasing: true,
2086
- embedded: true,
2087
- interactive: ["hasAttribute", "controls"],
2088
- transparent: ["@flow"],
2089
- attributes: {
2090
- crossorigin: {
2091
- omit: true,
2092
- enum: ["anonymous", "use-credentials"],
2093
- },
2094
- itemprop: {
2095
- allowed: allowedIfAttributeIsPresent("src"),
2096
- },
2097
- preload: {
2098
- omit: true,
2099
- enum: ["none", "metadata", "auto"],
2100
- },
2101
- },
2102
- permittedContent: ["@flow", "track", "source"],
2103
- permittedDescendants: [{ exclude: ["audio", "video"] }],
2104
- permittedOrder: ["source", "track", "@flow"],
2105
- },
2106
-
2107
- wbr: {
2108
- flow: true,
2109
- phrasing: true,
2110
- void: true,
2111
- },
2112
-
2113
- xmp: {
2114
- deprecated: {
2115
- documentation: "Use `<pre>` or `<code>` and escape content using HTML entities instead.",
2116
- source: "html32",
2117
- },
2118
- },
2119
- });
1
+ module.exports = require("../dist/cjs/elements").bundledElements.html5;