html-validate 8.10.0 → 8.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/browser.js +1 -0
- package/dist/cjs/browser.js.map +1 -1
- package/dist/cjs/core.js +205 -19
- package/dist/cjs/core.js.map +1 -1
- package/dist/cjs/elements.js +496 -235
- package/dist/cjs/elements.js.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/tsdoc-metadata.json +1 -1
- package/dist/es/browser.js +1 -1
- package/dist/es/cli.js +1 -1
- package/dist/es/core-browser.js +1 -1
- package/dist/es/core-nodejs.js +1 -1
- package/dist/es/core.js +205 -20
- package/dist/es/core.js.map +1 -1
- package/dist/es/elements.js +496 -235
- package/dist/es/elements.js.map +1 -1
- package/dist/es/html-validate.js +1 -1
- package/dist/es/index.js +1 -1
- package/dist/es/matchers-jestonly.js +1 -1
- package/dist/schema/elements.json +22 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types/browser.d.ts +78 -1
- package/dist/types/index.d.ts +78 -1
- package/package.json +8 -6
package/dist/es/elements.js
CHANGED
|
@@ -18,6 +18,21 @@ const ReferrerPolicy = [
|
|
|
18
18
|
"strict-origin-when-cross-origin",
|
|
19
19
|
"unsafe-url"
|
|
20
20
|
];
|
|
21
|
+
function isInsideLandmark(node) {
|
|
22
|
+
const selectors = [
|
|
23
|
+
"article",
|
|
24
|
+
"aside",
|
|
25
|
+
"main",
|
|
26
|
+
"nav",
|
|
27
|
+
"section",
|
|
28
|
+
'[role="article"]',
|
|
29
|
+
'[role="complementary"]',
|
|
30
|
+
'[role="main"]',
|
|
31
|
+
'[role="navigation"]',
|
|
32
|
+
'[role="region"]'
|
|
33
|
+
];
|
|
34
|
+
return Boolean(node.closest(selectors.join(",")));
|
|
35
|
+
}
|
|
21
36
|
var html5 = defineMetadata({
|
|
22
37
|
"*": {
|
|
23
38
|
attributes: {
|
|
@@ -111,14 +126,22 @@ var html5 = defineMetadata({
|
|
|
111
126
|
}
|
|
112
127
|
},
|
|
113
128
|
permittedDescendants: [{ exclude: "@interactive" }],
|
|
114
|
-
|
|
115
|
-
|
|
129
|
+
aria: {
|
|
130
|
+
implicitRole(node) {
|
|
131
|
+
return node.hasAttribute("href") ? "link" : "generic";
|
|
132
|
+
},
|
|
133
|
+
naming(node) {
|
|
134
|
+
return node.hasAttribute("href") ? "allowed" : "prohibited";
|
|
135
|
+
}
|
|
116
136
|
}
|
|
117
137
|
},
|
|
118
138
|
abbr: {
|
|
119
139
|
flow: true,
|
|
120
140
|
phrasing: true,
|
|
121
|
-
permittedContent: ["@phrasing"]
|
|
141
|
+
permittedContent: ["@phrasing"],
|
|
142
|
+
aria: {
|
|
143
|
+
naming: "prohibited"
|
|
144
|
+
}
|
|
122
145
|
},
|
|
123
146
|
acronym: {
|
|
124
147
|
deprecated: {
|
|
@@ -129,8 +152,8 @@ var html5 = defineMetadata({
|
|
|
129
152
|
},
|
|
130
153
|
address: {
|
|
131
154
|
flow: true,
|
|
132
|
-
|
|
133
|
-
|
|
155
|
+
aria: {
|
|
156
|
+
implicitRole: "group"
|
|
134
157
|
},
|
|
135
158
|
permittedContent: ["@flow"],
|
|
136
159
|
permittedDescendants: [{ exclude: ["address", "header", "footer", "@heading", "@sectioning"] }]
|
|
@@ -208,8 +231,13 @@ var html5 = defineMetadata({
|
|
|
208
231
|
enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
|
|
209
232
|
}
|
|
210
233
|
},
|
|
211
|
-
|
|
212
|
-
|
|
234
|
+
aria: {
|
|
235
|
+
implicitRole(node) {
|
|
236
|
+
return node.hasAttribute("href") ? "link" : "generic";
|
|
237
|
+
},
|
|
238
|
+
naming(node) {
|
|
239
|
+
return node.hasAttribute("href") ? "allowed" : "prohibited";
|
|
240
|
+
}
|
|
213
241
|
},
|
|
214
242
|
requiredAncestors: ["map"]
|
|
215
243
|
},
|
|
@@ -218,8 +246,8 @@ var html5 = defineMetadata({
|
|
|
218
246
|
sectioning: true,
|
|
219
247
|
permittedContent: ["@flow"],
|
|
220
248
|
permittedDescendants: [{ exclude: ["main"] }],
|
|
221
|
-
|
|
222
|
-
|
|
249
|
+
aria: {
|
|
250
|
+
implicitRole: "article"
|
|
223
251
|
}
|
|
224
252
|
},
|
|
225
253
|
aside: {
|
|
@@ -227,8 +255,8 @@ var html5 = defineMetadata({
|
|
|
227
255
|
sectioning: true,
|
|
228
256
|
permittedContent: ["@flow"],
|
|
229
257
|
permittedDescendants: [{ exclude: ["main"] }],
|
|
230
|
-
|
|
231
|
-
|
|
258
|
+
aria: {
|
|
259
|
+
implicitRole: "complementary"
|
|
232
260
|
}
|
|
233
261
|
},
|
|
234
262
|
audio: {
|
|
@@ -260,12 +288,19 @@ var html5 = defineMetadata({
|
|
|
260
288
|
b: {
|
|
261
289
|
flow: true,
|
|
262
290
|
phrasing: true,
|
|
263
|
-
permittedContent: ["@phrasing"]
|
|
291
|
+
permittedContent: ["@phrasing"],
|
|
292
|
+
aria: {
|
|
293
|
+
implicitRole: "generic",
|
|
294
|
+
naming: "prohibited"
|
|
295
|
+
}
|
|
264
296
|
},
|
|
265
297
|
base: {
|
|
266
298
|
metadata: true,
|
|
267
299
|
void: true,
|
|
268
|
-
permittedParent: ["head"]
|
|
300
|
+
permittedParent: ["head"],
|
|
301
|
+
aria: {
|
|
302
|
+
naming: "prohibited"
|
|
303
|
+
}
|
|
269
304
|
},
|
|
270
305
|
basefont: {
|
|
271
306
|
deprecated: {
|
|
@@ -277,12 +312,20 @@ var html5 = defineMetadata({
|
|
|
277
312
|
bdi: {
|
|
278
313
|
flow: true,
|
|
279
314
|
phrasing: true,
|
|
280
|
-
permittedContent: ["@phrasing"]
|
|
315
|
+
permittedContent: ["@phrasing"],
|
|
316
|
+
aria: {
|
|
317
|
+
implicitRole: "generic",
|
|
318
|
+
naming: "prohibited"
|
|
319
|
+
}
|
|
281
320
|
},
|
|
282
321
|
bdo: {
|
|
283
322
|
flow: true,
|
|
284
323
|
phrasing: true,
|
|
285
|
-
permittedContent: ["@phrasing"]
|
|
324
|
+
permittedContent: ["@phrasing"],
|
|
325
|
+
aria: {
|
|
326
|
+
implicitRole: "generic",
|
|
327
|
+
naming: "prohibited"
|
|
328
|
+
}
|
|
286
329
|
},
|
|
287
330
|
bgsound: {
|
|
288
331
|
deprecated: {
|
|
@@ -307,8 +350,8 @@ var html5 = defineMetadata({
|
|
|
307
350
|
blockquote: {
|
|
308
351
|
flow: true,
|
|
309
352
|
sectioning: true,
|
|
310
|
-
|
|
311
|
-
|
|
353
|
+
aria: {
|
|
354
|
+
implicitRole: "blockquote"
|
|
312
355
|
},
|
|
313
356
|
permittedContent: ["@flow"]
|
|
314
357
|
},
|
|
@@ -352,6 +395,10 @@ var html5 = defineMetadata({
|
|
|
352
395
|
vlink: {
|
|
353
396
|
deprecated: true
|
|
354
397
|
}
|
|
398
|
+
},
|
|
399
|
+
aria: {
|
|
400
|
+
implicitRole: "generic",
|
|
401
|
+
naming: "prohibited"
|
|
355
402
|
}
|
|
356
403
|
},
|
|
357
404
|
br: {
|
|
@@ -362,6 +409,9 @@ var html5 = defineMetadata({
|
|
|
362
409
|
clear: {
|
|
363
410
|
deprecated: true
|
|
364
411
|
}
|
|
412
|
+
},
|
|
413
|
+
aria: {
|
|
414
|
+
naming: "prohibited"
|
|
365
415
|
}
|
|
366
416
|
},
|
|
367
417
|
button: {
|
|
@@ -411,8 +461,8 @@ var html5 = defineMetadata({
|
|
|
411
461
|
enum: ["submit", "reset", "button"]
|
|
412
462
|
}
|
|
413
463
|
},
|
|
414
|
-
|
|
415
|
-
|
|
464
|
+
aria: {
|
|
465
|
+
implicitRole: "button"
|
|
416
466
|
},
|
|
417
467
|
permittedContent: ["@phrasing"],
|
|
418
468
|
permittedDescendants: [{ exclude: ["@interactive"] }],
|
|
@@ -431,6 +481,10 @@ var html5 = defineMetadata({
|
|
|
431
481
|
align: {
|
|
432
482
|
deprecated: true
|
|
433
483
|
}
|
|
484
|
+
},
|
|
485
|
+
aria: {
|
|
486
|
+
implicitRole: "caption",
|
|
487
|
+
naming: "prohibited"
|
|
434
488
|
}
|
|
435
489
|
},
|
|
436
490
|
center: {
|
|
@@ -443,12 +497,19 @@ var html5 = defineMetadata({
|
|
|
443
497
|
cite: {
|
|
444
498
|
flow: true,
|
|
445
499
|
phrasing: true,
|
|
446
|
-
permittedContent: ["@phrasing"]
|
|
500
|
+
permittedContent: ["@phrasing"],
|
|
501
|
+
aria: {
|
|
502
|
+
naming: "prohibited"
|
|
503
|
+
}
|
|
447
504
|
},
|
|
448
505
|
code: {
|
|
449
506
|
flow: true,
|
|
450
507
|
phrasing: true,
|
|
451
|
-
permittedContent: ["@phrasing"]
|
|
508
|
+
permittedContent: ["@phrasing"],
|
|
509
|
+
aria: {
|
|
510
|
+
implicitRole: "code",
|
|
511
|
+
naming: "prohibited"
|
|
512
|
+
}
|
|
452
513
|
},
|
|
453
514
|
col: {
|
|
454
515
|
attributes: {
|
|
@@ -471,7 +532,10 @@ var html5 = defineMetadata({
|
|
|
471
532
|
deprecated: true
|
|
472
533
|
}
|
|
473
534
|
},
|
|
474
|
-
void: true
|
|
535
|
+
void: true,
|
|
536
|
+
aria: {
|
|
537
|
+
naming: "prohibited"
|
|
538
|
+
}
|
|
475
539
|
},
|
|
476
540
|
colgroup: {
|
|
477
541
|
implicitClosed: ["colgroup"],
|
|
@@ -480,18 +544,26 @@ var html5 = defineMetadata({
|
|
|
480
544
|
enum: ["/\\d+/"]
|
|
481
545
|
}
|
|
482
546
|
},
|
|
483
|
-
permittedContent: ["col", "template"]
|
|
547
|
+
permittedContent: ["col", "template"],
|
|
548
|
+
aria: {
|
|
549
|
+
naming: "prohibited"
|
|
550
|
+
}
|
|
484
551
|
},
|
|
485
552
|
data: {
|
|
486
553
|
flow: true,
|
|
487
554
|
phrasing: true,
|
|
488
|
-
permittedContent: ["@phrasing"]
|
|
555
|
+
permittedContent: ["@phrasing"],
|
|
556
|
+
aria: {
|
|
557
|
+
implicitRole: "generic",
|
|
558
|
+
naming: "prohibited"
|
|
559
|
+
}
|
|
489
560
|
},
|
|
490
561
|
datalist: {
|
|
491
562
|
flow: true,
|
|
492
563
|
phrasing: true,
|
|
493
|
-
|
|
494
|
-
|
|
564
|
+
aria: {
|
|
565
|
+
implicitRole: "listbox",
|
|
566
|
+
naming: "prohibited"
|
|
495
567
|
},
|
|
496
568
|
permittedContent: ["@phrasing", "option"]
|
|
497
569
|
},
|
|
@@ -503,7 +575,11 @@ var html5 = defineMetadata({
|
|
|
503
575
|
del: {
|
|
504
576
|
flow: true,
|
|
505
577
|
phrasing: true,
|
|
506
|
-
transparent: true
|
|
578
|
+
transparent: true,
|
|
579
|
+
aria: {
|
|
580
|
+
implicitRole: "deletion",
|
|
581
|
+
naming: "prohibited"
|
|
582
|
+
}
|
|
507
583
|
},
|
|
508
584
|
details: {
|
|
509
585
|
flow: true,
|
|
@@ -514,8 +590,8 @@ var html5 = defineMetadata({
|
|
|
514
590
|
boolean: true
|
|
515
591
|
}
|
|
516
592
|
},
|
|
517
|
-
|
|
518
|
-
|
|
593
|
+
aria: {
|
|
594
|
+
implicitRole: "group"
|
|
519
595
|
},
|
|
520
596
|
permittedContent: ["summary", "@flow"],
|
|
521
597
|
permittedOrder: ["summary", "@flow"],
|
|
@@ -524,8 +600,8 @@ var html5 = defineMetadata({
|
|
|
524
600
|
dfn: {
|
|
525
601
|
flow: true,
|
|
526
602
|
phrasing: true,
|
|
527
|
-
|
|
528
|
-
|
|
603
|
+
aria: {
|
|
604
|
+
implicitRole: "term"
|
|
529
605
|
},
|
|
530
606
|
permittedContent: ["@phrasing"],
|
|
531
607
|
permittedDescendants: [{ exclude: ["dfn"] }]
|
|
@@ -538,8 +614,8 @@ var html5 = defineMetadata({
|
|
|
538
614
|
boolean: true
|
|
539
615
|
}
|
|
540
616
|
},
|
|
541
|
-
|
|
542
|
-
|
|
617
|
+
aria: {
|
|
618
|
+
implicitRole: "dialog"
|
|
543
619
|
}
|
|
544
620
|
},
|
|
545
621
|
dir: {
|
|
@@ -564,6 +640,10 @@ var html5 = defineMetadata({
|
|
|
564
640
|
datasrc: {
|
|
565
641
|
deprecated: true
|
|
566
642
|
}
|
|
643
|
+
},
|
|
644
|
+
aria: {
|
|
645
|
+
implicitRole: "generic",
|
|
646
|
+
naming: "prohibited"
|
|
567
647
|
}
|
|
568
648
|
},
|
|
569
649
|
dl: {
|
|
@@ -584,7 +664,11 @@ var html5 = defineMetadata({
|
|
|
584
664
|
em: {
|
|
585
665
|
flow: true,
|
|
586
666
|
phrasing: true,
|
|
587
|
-
permittedContent: ["@phrasing"]
|
|
667
|
+
permittedContent: ["@phrasing"],
|
|
668
|
+
aria: {
|
|
669
|
+
implicitRole: "emphasis",
|
|
670
|
+
naming: "prohibited"
|
|
671
|
+
}
|
|
588
672
|
},
|
|
589
673
|
embed: {
|
|
590
674
|
flow: true,
|
|
@@ -615,19 +699,22 @@ var html5 = defineMetadata({
|
|
|
615
699
|
boolean: true
|
|
616
700
|
}
|
|
617
701
|
},
|
|
618
|
-
|
|
619
|
-
|
|
702
|
+
aria: {
|
|
703
|
+
implicitRole: "group"
|
|
620
704
|
},
|
|
621
705
|
permittedContent: ["@flow", "legend?"],
|
|
622
706
|
permittedOrder: ["legend", "@flow"]
|
|
623
707
|
},
|
|
624
708
|
figcaption: {
|
|
625
|
-
permittedContent: ["@flow"]
|
|
709
|
+
permittedContent: ["@flow"],
|
|
710
|
+
aria: {
|
|
711
|
+
naming: "prohibited"
|
|
712
|
+
}
|
|
626
713
|
},
|
|
627
714
|
figure: {
|
|
628
715
|
flow: true,
|
|
629
|
-
|
|
630
|
-
|
|
716
|
+
aria: {
|
|
717
|
+
implicitRole: "figure"
|
|
631
718
|
},
|
|
632
719
|
permittedContent: ["@flow", "figcaption?"],
|
|
633
720
|
permittedOrder: ["figcaption", "@flow", "figcaption"]
|
|
@@ -641,23 +728,20 @@ var html5 = defineMetadata({
|
|
|
641
728
|
},
|
|
642
729
|
footer: {
|
|
643
730
|
flow: true,
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
return null;
|
|
659
|
-
} else {
|
|
660
|
-
return "contentinfo";
|
|
731
|
+
aria: {
|
|
732
|
+
implicitRole(node) {
|
|
733
|
+
if (isInsideLandmark(node)) {
|
|
734
|
+
return "generic";
|
|
735
|
+
} else {
|
|
736
|
+
return "contentinfo";
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
naming(node) {
|
|
740
|
+
if (isInsideLandmark(node)) {
|
|
741
|
+
return "prohibited";
|
|
742
|
+
} else {
|
|
743
|
+
return "allowed";
|
|
744
|
+
}
|
|
661
745
|
}
|
|
662
746
|
},
|
|
663
747
|
permittedContent: ["@flow"],
|
|
@@ -686,8 +770,8 @@ var html5 = defineMetadata({
|
|
|
686
770
|
enum: ["/[^_].*/", "_blank", "_self", "_parent", "_top"]
|
|
687
771
|
}
|
|
688
772
|
},
|
|
689
|
-
|
|
690
|
-
|
|
773
|
+
aria: {
|
|
774
|
+
implicitRole: "form"
|
|
691
775
|
},
|
|
692
776
|
permittedContent: ["@flow"],
|
|
693
777
|
permittedDescendants: [{ exclude: ["@form"] }]
|
|
@@ -724,8 +808,8 @@ var html5 = defineMetadata({
|
|
|
724
808
|
deprecated: true
|
|
725
809
|
}
|
|
726
810
|
},
|
|
727
|
-
|
|
728
|
-
|
|
811
|
+
aria: {
|
|
812
|
+
implicitRole: "heading"
|
|
729
813
|
}
|
|
730
814
|
},
|
|
731
815
|
h2: {
|
|
@@ -737,8 +821,8 @@ var html5 = defineMetadata({
|
|
|
737
821
|
deprecated: true
|
|
738
822
|
}
|
|
739
823
|
},
|
|
740
|
-
|
|
741
|
-
|
|
824
|
+
aria: {
|
|
825
|
+
implicitRole: "heading"
|
|
742
826
|
}
|
|
743
827
|
},
|
|
744
828
|
h3: {
|
|
@@ -750,8 +834,8 @@ var html5 = defineMetadata({
|
|
|
750
834
|
deprecated: true
|
|
751
835
|
}
|
|
752
836
|
},
|
|
753
|
-
|
|
754
|
-
|
|
837
|
+
aria: {
|
|
838
|
+
implicitRole: "heading"
|
|
755
839
|
}
|
|
756
840
|
},
|
|
757
841
|
h4: {
|
|
@@ -763,8 +847,8 @@ var html5 = defineMetadata({
|
|
|
763
847
|
deprecated: true
|
|
764
848
|
}
|
|
765
849
|
},
|
|
766
|
-
|
|
767
|
-
|
|
850
|
+
aria: {
|
|
851
|
+
implicitRole: "heading"
|
|
768
852
|
}
|
|
769
853
|
},
|
|
770
854
|
h5: {
|
|
@@ -776,8 +860,8 @@ var html5 = defineMetadata({
|
|
|
776
860
|
deprecated: true
|
|
777
861
|
}
|
|
778
862
|
},
|
|
779
|
-
|
|
780
|
-
|
|
863
|
+
aria: {
|
|
864
|
+
implicitRole: "heading"
|
|
781
865
|
}
|
|
782
866
|
},
|
|
783
867
|
h6: {
|
|
@@ -789,8 +873,8 @@ var html5 = defineMetadata({
|
|
|
789
873
|
deprecated: true
|
|
790
874
|
}
|
|
791
875
|
},
|
|
792
|
-
|
|
793
|
-
|
|
876
|
+
aria: {
|
|
877
|
+
implicitRole: "heading"
|
|
794
878
|
}
|
|
795
879
|
},
|
|
796
880
|
head: {
|
|
@@ -801,27 +885,27 @@ var html5 = defineMetadata({
|
|
|
801
885
|
profile: {
|
|
802
886
|
deprecated: true
|
|
803
887
|
}
|
|
888
|
+
},
|
|
889
|
+
aria: {
|
|
890
|
+
naming: "prohibited"
|
|
804
891
|
}
|
|
805
892
|
},
|
|
806
893
|
header: {
|
|
807
894
|
flow: true,
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
return null;
|
|
823
|
-
} else {
|
|
824
|
-
return "banner";
|
|
895
|
+
aria: {
|
|
896
|
+
implicitRole(node) {
|
|
897
|
+
if (isInsideLandmark(node)) {
|
|
898
|
+
return "generic";
|
|
899
|
+
} else {
|
|
900
|
+
return "banner";
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
naming(node) {
|
|
904
|
+
if (isInsideLandmark(node)) {
|
|
905
|
+
return "prohibited";
|
|
906
|
+
} else {
|
|
907
|
+
return "allowed";
|
|
908
|
+
}
|
|
825
909
|
}
|
|
826
910
|
},
|
|
827
911
|
permittedContent: ["@flow"],
|
|
@@ -832,7 +916,10 @@ var html5 = defineMetadata({
|
|
|
832
916
|
heading: true,
|
|
833
917
|
permittedContent: ["p", "@heading?"],
|
|
834
918
|
permittedDescendants: [{ exclude: ["hgroup"] }],
|
|
835
|
-
requiredContent: ["@heading"]
|
|
919
|
+
requiredContent: ["@heading"],
|
|
920
|
+
aria: {
|
|
921
|
+
implicitRole: "group"
|
|
922
|
+
}
|
|
836
923
|
},
|
|
837
924
|
hr: {
|
|
838
925
|
flow: true,
|
|
@@ -854,8 +941,8 @@ var html5 = defineMetadata({
|
|
|
854
941
|
deprecated: true
|
|
855
942
|
}
|
|
856
943
|
},
|
|
857
|
-
|
|
858
|
-
|
|
944
|
+
aria: {
|
|
945
|
+
implicitRole: "separator"
|
|
859
946
|
}
|
|
860
947
|
},
|
|
861
948
|
html: {
|
|
@@ -870,14 +957,19 @@ var html5 = defineMetadata({
|
|
|
870
957
|
deprecated: true
|
|
871
958
|
}
|
|
872
959
|
},
|
|
873
|
-
|
|
874
|
-
|
|
960
|
+
aria: {
|
|
961
|
+
implicitRole: "document",
|
|
962
|
+
naming: "prohibited"
|
|
875
963
|
}
|
|
876
964
|
},
|
|
877
965
|
i: {
|
|
878
966
|
flow: true,
|
|
879
967
|
phrasing: true,
|
|
880
|
-
permittedContent: ["@phrasing"]
|
|
968
|
+
permittedContent: ["@phrasing"],
|
|
969
|
+
aria: {
|
|
970
|
+
implicitRole: "generic",
|
|
971
|
+
naming: "prohibited"
|
|
972
|
+
}
|
|
881
973
|
},
|
|
882
974
|
iframe: {
|
|
883
975
|
flow: true,
|
|
@@ -979,12 +1071,28 @@ var html5 = defineMetadata({
|
|
|
979
1071
|
deprecated: true
|
|
980
1072
|
}
|
|
981
1073
|
},
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
1074
|
+
aria: {
|
|
1075
|
+
implicitRole(node) {
|
|
1076
|
+
const alt = node.getAttribute("alt");
|
|
1077
|
+
const ariaLabel = node.getAttribute("aria-label");
|
|
1078
|
+
const ariaLabelledBy = node.getAttribute("aria-labelledby");
|
|
1079
|
+
const title = node.getAttribute("title");
|
|
1080
|
+
if (alt === "" && !ariaLabel && !ariaLabelledBy && !title) {
|
|
1081
|
+
return "none";
|
|
1082
|
+
} else {
|
|
1083
|
+
return "img";
|
|
1084
|
+
}
|
|
1085
|
+
},
|
|
1086
|
+
naming(node) {
|
|
1087
|
+
const alt = node.getAttribute("alt");
|
|
1088
|
+
const ariaLabel = node.getAttribute("aria-label");
|
|
1089
|
+
const ariaLabelledBy = node.getAttribute("aria-labelledby");
|
|
1090
|
+
const title = node.getAttribute("title");
|
|
1091
|
+
if (!alt && !ariaLabel && !ariaLabelledBy && !title) {
|
|
1092
|
+
return "prohibited";
|
|
1093
|
+
} else {
|
|
1094
|
+
return "allowed";
|
|
1095
|
+
}
|
|
988
1096
|
}
|
|
989
1097
|
}
|
|
990
1098
|
},
|
|
@@ -1108,49 +1216,76 @@ var html5 = defineMetadata({
|
|
|
1108
1216
|
deprecated: true
|
|
1109
1217
|
}
|
|
1110
1218
|
},
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1219
|
+
aria: {
|
|
1220
|
+
/* eslint-disable-next-line complexity -- the standard is complicated */
|
|
1221
|
+
implicitRole(node) {
|
|
1222
|
+
const list = node.hasAttribute("list");
|
|
1223
|
+
if (list) {
|
|
1224
|
+
return "combobox";
|
|
1225
|
+
}
|
|
1226
|
+
const type = node.getAttribute("type");
|
|
1227
|
+
switch (type) {
|
|
1228
|
+
case "button":
|
|
1229
|
+
return "button";
|
|
1230
|
+
case "checkbox":
|
|
1231
|
+
return "checkbox";
|
|
1232
|
+
case "color":
|
|
1233
|
+
return null;
|
|
1234
|
+
case "date":
|
|
1235
|
+
return null;
|
|
1236
|
+
case "datetime-local":
|
|
1237
|
+
return null;
|
|
1238
|
+
case "email":
|
|
1239
|
+
return "textbox";
|
|
1240
|
+
case "file":
|
|
1241
|
+
return null;
|
|
1242
|
+
case "hidden":
|
|
1243
|
+
return null;
|
|
1244
|
+
case "image":
|
|
1245
|
+
return "button";
|
|
1246
|
+
case "month":
|
|
1247
|
+
return null;
|
|
1248
|
+
case "number":
|
|
1249
|
+
return "spinbutton";
|
|
1250
|
+
case "password":
|
|
1251
|
+
return null;
|
|
1252
|
+
case "radio":
|
|
1253
|
+
return "radio";
|
|
1254
|
+
case "range":
|
|
1255
|
+
return "slider";
|
|
1256
|
+
case "reset":
|
|
1257
|
+
return "button";
|
|
1258
|
+
case "search":
|
|
1259
|
+
return "searchbox";
|
|
1260
|
+
case "submit":
|
|
1261
|
+
return "button";
|
|
1262
|
+
case "tel":
|
|
1263
|
+
return "textbox";
|
|
1264
|
+
case "text":
|
|
1265
|
+
return "textbox";
|
|
1266
|
+
case "time":
|
|
1267
|
+
return null;
|
|
1268
|
+
case "url":
|
|
1269
|
+
return "textbox";
|
|
1270
|
+
case "week":
|
|
1271
|
+
return null;
|
|
1272
|
+
default:
|
|
1273
|
+
return "textbox";
|
|
1274
|
+
}
|
|
1275
|
+
},
|
|
1276
|
+
naming(node) {
|
|
1277
|
+
return node.getAttribute("type") !== "hidden" ? "allowed" : "prohibited";
|
|
1147
1278
|
}
|
|
1148
1279
|
}
|
|
1149
1280
|
},
|
|
1150
1281
|
ins: {
|
|
1151
1282
|
flow: true,
|
|
1152
1283
|
phrasing: true,
|
|
1153
|
-
transparent: true
|
|
1284
|
+
transparent: true,
|
|
1285
|
+
aria: {
|
|
1286
|
+
implicitRole: "insertion",
|
|
1287
|
+
naming: "prohibited"
|
|
1288
|
+
}
|
|
1154
1289
|
},
|
|
1155
1290
|
isindex: {
|
|
1156
1291
|
deprecated: {
|
|
@@ -1160,7 +1295,10 @@ var html5 = defineMetadata({
|
|
|
1160
1295
|
kbd: {
|
|
1161
1296
|
flow: true,
|
|
1162
1297
|
phrasing: true,
|
|
1163
|
-
permittedContent: ["@phrasing"]
|
|
1298
|
+
permittedContent: ["@phrasing"],
|
|
1299
|
+
aria: {
|
|
1300
|
+
naming: "prohibited"
|
|
1301
|
+
}
|
|
1164
1302
|
},
|
|
1165
1303
|
keygen: {
|
|
1166
1304
|
flow: true,
|
|
@@ -1189,6 +1327,9 @@ var html5 = defineMetadata({
|
|
|
1189
1327
|
for: {
|
|
1190
1328
|
enum: [validId]
|
|
1191
1329
|
}
|
|
1330
|
+
},
|
|
1331
|
+
aria: {
|
|
1332
|
+
naming: "prohibited"
|
|
1192
1333
|
}
|
|
1193
1334
|
},
|
|
1194
1335
|
legend: {
|
|
@@ -1206,6 +1347,9 @@ var html5 = defineMetadata({
|
|
|
1206
1347
|
datasrc: {
|
|
1207
1348
|
deprecated: true
|
|
1208
1349
|
}
|
|
1350
|
+
},
|
|
1351
|
+
aria: {
|
|
1352
|
+
naming: "prohibited"
|
|
1209
1353
|
}
|
|
1210
1354
|
},
|
|
1211
1355
|
li: {
|
|
@@ -1217,8 +1361,10 @@ var html5 = defineMetadata({
|
|
|
1217
1361
|
deprecated: true
|
|
1218
1362
|
}
|
|
1219
1363
|
},
|
|
1220
|
-
|
|
1221
|
-
|
|
1364
|
+
aria: {
|
|
1365
|
+
implicitRole(node) {
|
|
1366
|
+
return node.closest("ul, ol, menu") ? "listitem" : "generic";
|
|
1367
|
+
}
|
|
1222
1368
|
}
|
|
1223
1369
|
},
|
|
1224
1370
|
link: {
|
|
@@ -1288,6 +1434,9 @@ var html5 = defineMetadata({
|
|
|
1288
1434
|
urn: {
|
|
1289
1435
|
deprecated: true
|
|
1290
1436
|
}
|
|
1437
|
+
},
|
|
1438
|
+
aria: {
|
|
1439
|
+
naming: "prohibited"
|
|
1291
1440
|
}
|
|
1292
1441
|
},
|
|
1293
1442
|
listing: {
|
|
@@ -1297,8 +1446,8 @@ var html5 = defineMetadata({
|
|
|
1297
1446
|
},
|
|
1298
1447
|
main: {
|
|
1299
1448
|
flow: true,
|
|
1300
|
-
|
|
1301
|
-
|
|
1449
|
+
aria: {
|
|
1450
|
+
implicitRole: "main"
|
|
1302
1451
|
}
|
|
1303
1452
|
},
|
|
1304
1453
|
map: {
|
|
@@ -1310,12 +1459,18 @@ var html5 = defineMetadata({
|
|
|
1310
1459
|
required: true,
|
|
1311
1460
|
enum: ["/\\S+/"]
|
|
1312
1461
|
}
|
|
1462
|
+
},
|
|
1463
|
+
aria: {
|
|
1464
|
+
naming: "prohibited"
|
|
1313
1465
|
}
|
|
1314
1466
|
},
|
|
1315
1467
|
mark: {
|
|
1316
1468
|
flow: true,
|
|
1317
1469
|
phrasing: true,
|
|
1318
|
-
permittedContent: ["@phrasing"]
|
|
1470
|
+
permittedContent: ["@phrasing"],
|
|
1471
|
+
aria: {
|
|
1472
|
+
naming: "prohibited"
|
|
1473
|
+
}
|
|
1319
1474
|
},
|
|
1320
1475
|
marquee: {
|
|
1321
1476
|
deprecated: {
|
|
@@ -1362,14 +1517,14 @@ var html5 = defineMetadata({
|
|
|
1362
1517
|
deprecated: true
|
|
1363
1518
|
}
|
|
1364
1519
|
},
|
|
1365
|
-
|
|
1366
|
-
|
|
1520
|
+
aria: {
|
|
1521
|
+
implicitRole: "math"
|
|
1367
1522
|
}
|
|
1368
1523
|
},
|
|
1369
1524
|
menu: {
|
|
1370
1525
|
flow: true,
|
|
1371
|
-
|
|
1372
|
-
|
|
1526
|
+
aria: {
|
|
1527
|
+
implicitRole: "list"
|
|
1373
1528
|
},
|
|
1374
1529
|
permittedContent: ["@script", "li"]
|
|
1375
1530
|
},
|
|
@@ -1397,14 +1552,17 @@ var html5 = defineMetadata({
|
|
|
1397
1552
|
scheme: {
|
|
1398
1553
|
deprecated: true
|
|
1399
1554
|
}
|
|
1555
|
+
},
|
|
1556
|
+
aria: {
|
|
1557
|
+
naming: "prohibited"
|
|
1400
1558
|
}
|
|
1401
1559
|
},
|
|
1402
1560
|
meter: {
|
|
1403
1561
|
flow: true,
|
|
1404
1562
|
phrasing: true,
|
|
1405
1563
|
labelable: true,
|
|
1406
|
-
|
|
1407
|
-
|
|
1564
|
+
aria: {
|
|
1565
|
+
implicitRole: "meter"
|
|
1408
1566
|
},
|
|
1409
1567
|
permittedContent: ["@phrasing"],
|
|
1410
1568
|
permittedDescendants: [{ exclude: "meter" }]
|
|
@@ -1419,8 +1577,8 @@ var html5 = defineMetadata({
|
|
|
1419
1577
|
nav: {
|
|
1420
1578
|
flow: true,
|
|
1421
1579
|
sectioning: true,
|
|
1422
|
-
|
|
1423
|
-
|
|
1580
|
+
aria: {
|
|
1581
|
+
implicitRole: "navigation"
|
|
1424
1582
|
},
|
|
1425
1583
|
permittedContent: ["@flow"],
|
|
1426
1584
|
permittedDescendants: [{ exclude: "main" }]
|
|
@@ -1452,7 +1610,10 @@ var html5 = defineMetadata({
|
|
|
1452
1610
|
flow: true,
|
|
1453
1611
|
phrasing: true,
|
|
1454
1612
|
transparent: true,
|
|
1455
|
-
permittedDescendants: [{ exclude: "noscript" }]
|
|
1613
|
+
permittedDescendants: [{ exclude: "noscript" }],
|
|
1614
|
+
aria: {
|
|
1615
|
+
naming: "prohibited"
|
|
1616
|
+
}
|
|
1456
1617
|
},
|
|
1457
1618
|
object: {
|
|
1458
1619
|
flow: true,
|
|
@@ -1534,8 +1695,8 @@ var html5 = defineMetadata({
|
|
|
1534
1695
|
enum: ["a", "A", "i", "I", "1"]
|
|
1535
1696
|
}
|
|
1536
1697
|
},
|
|
1537
|
-
|
|
1538
|
-
|
|
1698
|
+
aria: {
|
|
1699
|
+
implicitRole: "list"
|
|
1539
1700
|
},
|
|
1540
1701
|
permittedContent: ["@script", "li"]
|
|
1541
1702
|
},
|
|
@@ -1546,8 +1707,8 @@ var html5 = defineMetadata({
|
|
|
1546
1707
|
boolean: true
|
|
1547
1708
|
}
|
|
1548
1709
|
},
|
|
1549
|
-
|
|
1550
|
-
|
|
1710
|
+
aria: {
|
|
1711
|
+
implicitRole: "group"
|
|
1551
1712
|
},
|
|
1552
1713
|
permittedContent: ["@script", "option"]
|
|
1553
1714
|
},
|
|
@@ -1570,8 +1731,8 @@ var html5 = defineMetadata({
|
|
|
1570
1731
|
boolean: true
|
|
1571
1732
|
}
|
|
1572
1733
|
},
|
|
1573
|
-
|
|
1574
|
-
|
|
1734
|
+
aria: {
|
|
1735
|
+
implicitRole: "option"
|
|
1575
1736
|
},
|
|
1576
1737
|
permittedContent: []
|
|
1577
1738
|
},
|
|
@@ -1582,8 +1743,8 @@ var html5 = defineMetadata({
|
|
|
1582
1743
|
listed: true
|
|
1583
1744
|
},
|
|
1584
1745
|
labelable: true,
|
|
1585
|
-
|
|
1586
|
-
|
|
1746
|
+
aria: {
|
|
1747
|
+
implicitRole: "status"
|
|
1587
1748
|
},
|
|
1588
1749
|
permittedContent: ["@phrasing"]
|
|
1589
1750
|
},
|
|
@@ -1622,6 +1783,10 @@ var html5 = defineMetadata({
|
|
|
1622
1783
|
align: {
|
|
1623
1784
|
deprecated: true
|
|
1624
1785
|
}
|
|
1786
|
+
},
|
|
1787
|
+
aria: {
|
|
1788
|
+
implicitRole: "paragraph",
|
|
1789
|
+
naming: "prohibited"
|
|
1625
1790
|
}
|
|
1626
1791
|
},
|
|
1627
1792
|
param: {
|
|
@@ -1636,6 +1801,9 @@ var html5 = defineMetadata({
|
|
|
1636
1801
|
valuetype: {
|
|
1637
1802
|
deprecated: true
|
|
1638
1803
|
}
|
|
1804
|
+
},
|
|
1805
|
+
aria: {
|
|
1806
|
+
naming: "prohibited"
|
|
1639
1807
|
}
|
|
1640
1808
|
},
|
|
1641
1809
|
picture: {
|
|
@@ -1643,7 +1811,10 @@ var html5 = defineMetadata({
|
|
|
1643
1811
|
phrasing: true,
|
|
1644
1812
|
embedded: true,
|
|
1645
1813
|
permittedContent: ["@script", "source", "img"],
|
|
1646
|
-
permittedOrder: ["source", "img"]
|
|
1814
|
+
permittedOrder: ["source", "img"],
|
|
1815
|
+
aria: {
|
|
1816
|
+
naming: "prohibited"
|
|
1817
|
+
}
|
|
1647
1818
|
},
|
|
1648
1819
|
plaintext: {
|
|
1649
1820
|
deprecated: {
|
|
@@ -1659,14 +1830,18 @@ var html5 = defineMetadata({
|
|
|
1659
1830
|
width: {
|
|
1660
1831
|
deprecated: true
|
|
1661
1832
|
}
|
|
1833
|
+
},
|
|
1834
|
+
aria: {
|
|
1835
|
+
implicitRole: "generic",
|
|
1836
|
+
naming: "prohibited"
|
|
1662
1837
|
}
|
|
1663
1838
|
},
|
|
1664
1839
|
progress: {
|
|
1665
1840
|
flow: true,
|
|
1666
1841
|
phrasing: true,
|
|
1667
1842
|
labelable: true,
|
|
1668
|
-
|
|
1669
|
-
|
|
1843
|
+
aria: {
|
|
1844
|
+
implicitRole: "progressbar"
|
|
1670
1845
|
},
|
|
1671
1846
|
permittedContent: ["@phrasing"],
|
|
1672
1847
|
permittedDescendants: [{ exclude: "progress" }]
|
|
@@ -1674,7 +1849,11 @@ var html5 = defineMetadata({
|
|
|
1674
1849
|
q: {
|
|
1675
1850
|
flow: true,
|
|
1676
1851
|
phrasing: true,
|
|
1677
|
-
permittedContent: ["@phrasing"]
|
|
1852
|
+
permittedContent: ["@phrasing"],
|
|
1853
|
+
aria: {
|
|
1854
|
+
implicitRole: "generic",
|
|
1855
|
+
naming: "prohibited"
|
|
1856
|
+
}
|
|
1678
1857
|
},
|
|
1679
1858
|
rb: {
|
|
1680
1859
|
implicitClosed: ["rb", "rt", "rtc", "rp"],
|
|
@@ -1682,11 +1861,17 @@ var html5 = defineMetadata({
|
|
|
1682
1861
|
},
|
|
1683
1862
|
rp: {
|
|
1684
1863
|
implicitClosed: ["rb", "rt", "rtc", "rp"],
|
|
1685
|
-
permittedContent: ["@phrasing"]
|
|
1864
|
+
permittedContent: ["@phrasing"],
|
|
1865
|
+
aria: {
|
|
1866
|
+
naming: "prohibited"
|
|
1867
|
+
}
|
|
1686
1868
|
},
|
|
1687
1869
|
rt: {
|
|
1688
1870
|
implicitClosed: ["rb", "rt", "rtc", "rp"],
|
|
1689
|
-
permittedContent: ["@phrasing"]
|
|
1871
|
+
permittedContent: ["@phrasing"],
|
|
1872
|
+
aria: {
|
|
1873
|
+
naming: "prohibited"
|
|
1874
|
+
}
|
|
1690
1875
|
},
|
|
1691
1876
|
rtc: {
|
|
1692
1877
|
implicitClosed: ["rb", "rtc", "rp"],
|
|
@@ -1700,12 +1885,20 @@ var html5 = defineMetadata({
|
|
|
1700
1885
|
s: {
|
|
1701
1886
|
flow: true,
|
|
1702
1887
|
phrasing: true,
|
|
1703
|
-
permittedContent: ["@phrasing"]
|
|
1888
|
+
permittedContent: ["@phrasing"],
|
|
1889
|
+
aria: {
|
|
1890
|
+
implicitRole: "deletion",
|
|
1891
|
+
naming: "prohibited"
|
|
1892
|
+
}
|
|
1704
1893
|
},
|
|
1705
1894
|
samp: {
|
|
1706
1895
|
flow: true,
|
|
1707
1896
|
phrasing: true,
|
|
1708
|
-
permittedContent: ["@phrasing"]
|
|
1897
|
+
permittedContent: ["@phrasing"],
|
|
1898
|
+
aria: {
|
|
1899
|
+
implicitRole: "generic",
|
|
1900
|
+
naming: "prohibited"
|
|
1901
|
+
}
|
|
1709
1902
|
},
|
|
1710
1903
|
script: {
|
|
1711
1904
|
metadata: true,
|
|
@@ -1745,19 +1938,25 @@ var html5 = defineMetadata({
|
|
|
1745
1938
|
src: {
|
|
1746
1939
|
enum: ["/.+/"]
|
|
1747
1940
|
}
|
|
1941
|
+
},
|
|
1942
|
+
aria: {
|
|
1943
|
+
naming: "prohibited"
|
|
1748
1944
|
}
|
|
1749
1945
|
},
|
|
1750
1946
|
search: {
|
|
1751
1947
|
flow: true,
|
|
1752
|
-
|
|
1753
|
-
|
|
1948
|
+
aria: {
|
|
1949
|
+
implicitRole: "search"
|
|
1754
1950
|
}
|
|
1755
1951
|
},
|
|
1756
1952
|
section: {
|
|
1757
1953
|
flow: true,
|
|
1758
1954
|
sectioning: true,
|
|
1759
|
-
|
|
1760
|
-
|
|
1955
|
+
aria: {
|
|
1956
|
+
implicitRole(node) {
|
|
1957
|
+
const name = node.hasAttribute("aria-label") || node.hasAttribute("aria-labelledby");
|
|
1958
|
+
return name ? "region" : "generic";
|
|
1959
|
+
}
|
|
1761
1960
|
},
|
|
1762
1961
|
permittedContent: ["@flow"]
|
|
1763
1962
|
},
|
|
@@ -1787,31 +1986,40 @@ var html5 = defineMetadata({
|
|
|
1787
1986
|
enum: ["/\\d+/"]
|
|
1788
1987
|
}
|
|
1789
1988
|
},
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
}
|
|
1795
|
-
const size = node.getAttribute("size");
|
|
1796
|
-
if (typeof size === "string") {
|
|
1797
|
-
const parsed = parseInt(size, 10);
|
|
1798
|
-
if (parsed > 1) {
|
|
1989
|
+
aria: {
|
|
1990
|
+
implicitRole(node) {
|
|
1991
|
+
const multiple = node.hasAttribute("multiple");
|
|
1992
|
+
if (multiple) {
|
|
1799
1993
|
return "listbox";
|
|
1800
1994
|
}
|
|
1995
|
+
const size = node.getAttribute("size");
|
|
1996
|
+
if (typeof size === "string") {
|
|
1997
|
+
const parsed = parseInt(size, 10);
|
|
1998
|
+
if (parsed > 1) {
|
|
1999
|
+
return "listbox";
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
return "combobox";
|
|
1801
2003
|
}
|
|
1802
|
-
return "combobox";
|
|
1803
2004
|
},
|
|
1804
2005
|
permittedContent: ["@script", "datasrc", "datafld", "dataformatas", "option", "optgroup"]
|
|
1805
2006
|
},
|
|
1806
2007
|
slot: {
|
|
1807
2008
|
flow: true,
|
|
1808
2009
|
phrasing: true,
|
|
1809
|
-
transparent: true
|
|
2010
|
+
transparent: true,
|
|
2011
|
+
aria: {
|
|
2012
|
+
naming: "prohibited"
|
|
2013
|
+
}
|
|
1810
2014
|
},
|
|
1811
2015
|
small: {
|
|
1812
2016
|
flow: true,
|
|
1813
2017
|
phrasing: true,
|
|
1814
|
-
permittedContent: ["@phrasing"]
|
|
2018
|
+
permittedContent: ["@phrasing"],
|
|
2019
|
+
aria: {
|
|
2020
|
+
implicitRole: "generic",
|
|
2021
|
+
naming: "prohibited"
|
|
2022
|
+
}
|
|
1815
2023
|
},
|
|
1816
2024
|
source: {
|
|
1817
2025
|
void: true,
|
|
@@ -1835,6 +2043,9 @@ var html5 = defineMetadata({
|
|
|
1835
2043
|
allowed: allowedIfParentIsPresent("picture"),
|
|
1836
2044
|
enum: ["/\\d+/"]
|
|
1837
2045
|
}
|
|
2046
|
+
},
|
|
2047
|
+
aria: {
|
|
2048
|
+
naming: "prohibited"
|
|
1838
2049
|
}
|
|
1839
2050
|
},
|
|
1840
2051
|
spacer: {
|
|
@@ -1858,6 +2069,10 @@ var html5 = defineMetadata({
|
|
|
1858
2069
|
datasrc: {
|
|
1859
2070
|
deprecated: true
|
|
1860
2071
|
}
|
|
2072
|
+
},
|
|
2073
|
+
aria: {
|
|
2074
|
+
implicitRole: "generic",
|
|
2075
|
+
naming: "prohibited"
|
|
1861
2076
|
}
|
|
1862
2077
|
},
|
|
1863
2078
|
strike: {
|
|
@@ -1870,29 +2085,50 @@ var html5 = defineMetadata({
|
|
|
1870
2085
|
strong: {
|
|
1871
2086
|
flow: true,
|
|
1872
2087
|
phrasing: true,
|
|
1873
|
-
permittedContent: ["@phrasing"]
|
|
2088
|
+
permittedContent: ["@phrasing"],
|
|
2089
|
+
aria: {
|
|
2090
|
+
implicitRole: "strong",
|
|
2091
|
+
naming: "prohibited"
|
|
2092
|
+
}
|
|
1874
2093
|
},
|
|
1875
2094
|
style: {
|
|
1876
|
-
metadata: true
|
|
2095
|
+
metadata: true,
|
|
2096
|
+
aria: {
|
|
2097
|
+
naming: "prohibited"
|
|
2098
|
+
}
|
|
1877
2099
|
},
|
|
1878
2100
|
sub: {
|
|
1879
2101
|
flow: true,
|
|
1880
2102
|
phrasing: true,
|
|
1881
|
-
permittedContent: ["@phrasing"]
|
|
2103
|
+
permittedContent: ["@phrasing"],
|
|
2104
|
+
aria: {
|
|
2105
|
+
implicitRole: "subscript",
|
|
2106
|
+
naming: "prohibited"
|
|
2107
|
+
}
|
|
1882
2108
|
},
|
|
1883
2109
|
summary: {
|
|
1884
|
-
permittedContent: ["@phrasing", "@heading"]
|
|
2110
|
+
permittedContent: ["@phrasing", "@heading"],
|
|
2111
|
+
aria: {
|
|
2112
|
+
implicitRole: "button"
|
|
2113
|
+
}
|
|
1885
2114
|
},
|
|
1886
2115
|
sup: {
|
|
1887
2116
|
flow: true,
|
|
1888
2117
|
phrasing: true,
|
|
1889
|
-
permittedContent: ["@phrasing"]
|
|
2118
|
+
permittedContent: ["@phrasing"],
|
|
2119
|
+
aria: {
|
|
2120
|
+
implicitRole: "superscript",
|
|
2121
|
+
naming: "prohibited"
|
|
2122
|
+
}
|
|
1890
2123
|
},
|
|
1891
2124
|
svg: {
|
|
1892
2125
|
flow: true,
|
|
1893
2126
|
foreign: true,
|
|
1894
2127
|
phrasing: true,
|
|
1895
|
-
embedded: true
|
|
2128
|
+
embedded: true,
|
|
2129
|
+
aria: {
|
|
2130
|
+
implicitRole: "graphics-document"
|
|
2131
|
+
}
|
|
1896
2132
|
},
|
|
1897
2133
|
/* while not part of HTML 5 specification these two elements are handled as
|
|
1898
2134
|
* special cases to allow them as accessible text and to avoid issues with
|
|
@@ -1944,8 +2180,8 @@ var html5 = defineMetadata({
|
|
|
1944
2180
|
deprecated: true
|
|
1945
2181
|
}
|
|
1946
2182
|
},
|
|
1947
|
-
|
|
1948
|
-
|
|
2183
|
+
aria: {
|
|
2184
|
+
implicitRole: "table"
|
|
1949
2185
|
}
|
|
1950
2186
|
},
|
|
1951
2187
|
tbody: {
|
|
@@ -1968,8 +2204,8 @@ var html5 = defineMetadata({
|
|
|
1968
2204
|
deprecated: true
|
|
1969
2205
|
}
|
|
1970
2206
|
},
|
|
1971
|
-
|
|
1972
|
-
|
|
2207
|
+
aria: {
|
|
2208
|
+
implicitRole: "rowgroup"
|
|
1973
2209
|
}
|
|
1974
2210
|
},
|
|
1975
2211
|
td: {
|
|
@@ -2016,13 +2252,19 @@ var html5 = defineMetadata({
|
|
|
2016
2252
|
deprecated: true
|
|
2017
2253
|
}
|
|
2018
2254
|
},
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2255
|
+
aria: {
|
|
2256
|
+
implicitRole(node) {
|
|
2257
|
+
const table = node.closest("table");
|
|
2258
|
+
const tableRole = (table == null ? void 0 : table.getAttribute("role")) ?? "table";
|
|
2259
|
+
switch (tableRole) {
|
|
2260
|
+
case "table":
|
|
2261
|
+
return "cell";
|
|
2262
|
+
case "grid":
|
|
2263
|
+
case "treegrid":
|
|
2264
|
+
return "gridcell";
|
|
2265
|
+
default:
|
|
2266
|
+
return null;
|
|
2267
|
+
}
|
|
2026
2268
|
}
|
|
2027
2269
|
},
|
|
2028
2270
|
permittedContent: ["@flow"]
|
|
@@ -2031,7 +2273,10 @@ var html5 = defineMetadata({
|
|
|
2031
2273
|
metadata: true,
|
|
2032
2274
|
flow: true,
|
|
2033
2275
|
phrasing: true,
|
|
2034
|
-
scriptSupporting: true
|
|
2276
|
+
scriptSupporting: true,
|
|
2277
|
+
aria: {
|
|
2278
|
+
naming: "prohibited"
|
|
2279
|
+
}
|
|
2035
2280
|
},
|
|
2036
2281
|
textarea: {
|
|
2037
2282
|
flow: true,
|
|
@@ -2083,8 +2328,8 @@ var html5 = defineMetadata({
|
|
|
2083
2328
|
enum: ["hard", "soft"]
|
|
2084
2329
|
}
|
|
2085
2330
|
},
|
|
2086
|
-
|
|
2087
|
-
|
|
2331
|
+
aria: {
|
|
2332
|
+
implicitRole: "textbox"
|
|
2088
2333
|
},
|
|
2089
2334
|
permittedContent: []
|
|
2090
2335
|
},
|
|
@@ -2108,8 +2353,8 @@ var html5 = defineMetadata({
|
|
|
2108
2353
|
deprecated: true
|
|
2109
2354
|
}
|
|
2110
2355
|
},
|
|
2111
|
-
|
|
2112
|
-
|
|
2356
|
+
aria: {
|
|
2357
|
+
implicitRole: "rowgroup"
|
|
2113
2358
|
}
|
|
2114
2359
|
},
|
|
2115
2360
|
th: {
|
|
@@ -2156,23 +2401,22 @@ var html5 = defineMetadata({
|
|
|
2156
2401
|
deprecated: true
|
|
2157
2402
|
}
|
|
2158
2403
|
},
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
return tableRole === "table" ? "cell" : "gridcell";
|
|
2404
|
+
aria: {
|
|
2405
|
+
implicitRole(node) {
|
|
2406
|
+
const table = node.closest("table");
|
|
2407
|
+
const tableRole = (table == null ? void 0 : table.getAttribute("role")) ?? "table";
|
|
2408
|
+
if (typeof tableRole !== "string" || !["table", "grid", "treegrid"].includes(tableRole)) {
|
|
2409
|
+
return null;
|
|
2410
|
+
}
|
|
2411
|
+
const scope = node.getAttribute("scope");
|
|
2412
|
+
switch (scope) {
|
|
2413
|
+
case "col":
|
|
2414
|
+
return "columnheader";
|
|
2415
|
+
case "row":
|
|
2416
|
+
return "rowheader";
|
|
2417
|
+
default:
|
|
2418
|
+
return tableRole === "table" ? "cell" : "gridcell";
|
|
2419
|
+
}
|
|
2176
2420
|
}
|
|
2177
2421
|
},
|
|
2178
2422
|
permittedContent: ["@flow"],
|
|
@@ -2198,22 +2442,26 @@ var html5 = defineMetadata({
|
|
|
2198
2442
|
deprecated: true
|
|
2199
2443
|
}
|
|
2200
2444
|
},
|
|
2201
|
-
|
|
2202
|
-
|
|
2445
|
+
aria: {
|
|
2446
|
+
implicitRole: "rowgroup"
|
|
2203
2447
|
}
|
|
2204
2448
|
},
|
|
2205
2449
|
time: {
|
|
2206
2450
|
flow: true,
|
|
2207
2451
|
phrasing: true,
|
|
2208
|
-
|
|
2209
|
-
|
|
2452
|
+
aria: {
|
|
2453
|
+
implicitRole: "time",
|
|
2454
|
+
naming: "prohibited"
|
|
2210
2455
|
},
|
|
2211
2456
|
permittedContent: ["@phrasing"]
|
|
2212
2457
|
},
|
|
2213
2458
|
title: {
|
|
2214
2459
|
metadata: true,
|
|
2215
2460
|
permittedContent: [],
|
|
2216
|
-
permittedParent: ["head"]
|
|
2461
|
+
permittedParent: ["head"],
|
|
2462
|
+
aria: {
|
|
2463
|
+
naming: "prohibited"
|
|
2464
|
+
}
|
|
2217
2465
|
},
|
|
2218
2466
|
tr: {
|
|
2219
2467
|
implicitClosed: ["tr"],
|
|
@@ -2238,12 +2486,15 @@ var html5 = defineMetadata({
|
|
|
2238
2486
|
deprecated: true
|
|
2239
2487
|
}
|
|
2240
2488
|
},
|
|
2241
|
-
|
|
2242
|
-
|
|
2489
|
+
aria: {
|
|
2490
|
+
implicitRole: "row"
|
|
2243
2491
|
}
|
|
2244
2492
|
},
|
|
2245
2493
|
track: {
|
|
2246
|
-
void: true
|
|
2494
|
+
void: true,
|
|
2495
|
+
aria: {
|
|
2496
|
+
naming: "prohibited"
|
|
2497
|
+
}
|
|
2247
2498
|
},
|
|
2248
2499
|
tt: {
|
|
2249
2500
|
deprecated: {
|
|
@@ -2254,7 +2505,11 @@ var html5 = defineMetadata({
|
|
|
2254
2505
|
u: {
|
|
2255
2506
|
flow: true,
|
|
2256
2507
|
phrasing: true,
|
|
2257
|
-
permittedContent: ["@phrasing"]
|
|
2508
|
+
permittedContent: ["@phrasing"],
|
|
2509
|
+
aria: {
|
|
2510
|
+
implicitRole: "generic",
|
|
2511
|
+
naming: "prohibited"
|
|
2512
|
+
}
|
|
2258
2513
|
},
|
|
2259
2514
|
ul: {
|
|
2260
2515
|
flow: true,
|
|
@@ -2267,14 +2522,17 @@ var html5 = defineMetadata({
|
|
|
2267
2522
|
deprecated: true
|
|
2268
2523
|
}
|
|
2269
2524
|
},
|
|
2270
|
-
|
|
2271
|
-
|
|
2525
|
+
aria: {
|
|
2526
|
+
implicitRole: "list"
|
|
2272
2527
|
}
|
|
2273
2528
|
},
|
|
2274
2529
|
var: {
|
|
2275
2530
|
flow: true,
|
|
2276
2531
|
phrasing: true,
|
|
2277
|
-
permittedContent: ["@phrasing"]
|
|
2532
|
+
permittedContent: ["@phrasing"],
|
|
2533
|
+
aria: {
|
|
2534
|
+
naming: "prohibited"
|
|
2535
|
+
}
|
|
2278
2536
|
},
|
|
2279
2537
|
video: {
|
|
2280
2538
|
flow: true,
|
|
@@ -2305,7 +2563,10 @@ var html5 = defineMetadata({
|
|
|
2305
2563
|
wbr: {
|
|
2306
2564
|
flow: true,
|
|
2307
2565
|
phrasing: true,
|
|
2308
|
-
void: true
|
|
2566
|
+
void: true,
|
|
2567
|
+
aria: {
|
|
2568
|
+
naming: "prohibited"
|
|
2569
|
+
}
|
|
2309
2570
|
},
|
|
2310
2571
|
xmp: {
|
|
2311
2572
|
deprecated: {
|