testilo 3.9.1 → 3.9.2
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/package.json +1 -1
- package/procs/score/sp15a.js +113 -17
package/package.json
CHANGED
package/procs/score/sp15a.js
CHANGED
|
@@ -58,9 +58,22 @@ const otherPackages = ['alfa', 'axe', 'continuum', 'htmlcs', 'ibm', 'nuVal', 'te
|
|
|
58
58
|
const preWeightedPackages = ['axe', 'tenon', 'testaro'];
|
|
59
59
|
const testMatchers = {
|
|
60
60
|
nuVal: [
|
|
61
|
+
/^CSS: “background-image”: .+ is not a “background-image” value.*$/,
|
|
62
|
+
/^CSS: “background”: .+ is not a “color” value.*$/,
|
|
63
|
+
/^CSS: “cursor”: .+ is not a “cursor” value.*$/,
|
|
64
|
+
/^CSS: “transform”: .+ is not a “transform” value.*$/,
|
|
65
|
+
/^Duplicate ID .+$|^The first occurrence of ID .+ was here.*$/,
|
|
66
|
+
/^Start tag .+ seen but an element of the same type was already open.*$/,
|
|
67
|
+
/^End tag .+ violates nesting rules.*$/,
|
|
68
|
+
/^Attribute .+ is not serializable as XML 1\.0.*$/,
|
|
69
|
+
/^Attribute .+ not allowed on element “meta” at this point.*$/,
|
|
61
70
|
/^Attribute .+ not allowed on element .+ at this point.*$/,
|
|
62
71
|
/^Bad value .+ for attribute .+ on element “meta”.*$/,
|
|
63
|
-
/^
|
|
72
|
+
/^Bad value .+ for attribute .+ on element .+$/,
|
|
73
|
+
/^Attribute .+ not allowed here.*$/,
|
|
74
|
+
/^CSS: .+: Property .+ doesn't exist.*$/,
|
|
75
|
+
/^CSS: .+: only “0” can be a “length”. You must put a unit after your number.*$/,
|
|
76
|
+
/^Element .+ not allowed as child of element .+ in this context.*$/
|
|
64
77
|
]
|
|
65
78
|
};
|
|
66
79
|
const groups = {
|
|
@@ -115,6 +128,12 @@ const groups = {
|
|
|
115
128
|
quality: 1,
|
|
116
129
|
what: 'Element id attribute value is not unique within the document'
|
|
117
130
|
}
|
|
131
|
+
},
|
|
132
|
+
nuVal: {
|
|
133
|
+
'^Duplicate ID .+$|^The first occurrence of ID .+ was here.*$': {
|
|
134
|
+
quality: 1,
|
|
135
|
+
what: 'Duplicate id'
|
|
136
|
+
}
|
|
118
137
|
}
|
|
119
138
|
}
|
|
120
139
|
},
|
|
@@ -379,6 +398,17 @@ const groups = {
|
|
|
379
398
|
}
|
|
380
399
|
}
|
|
381
400
|
},
|
|
401
|
+
backgroundBad: {
|
|
402
|
+
weight: 4,
|
|
403
|
+
packages: {
|
|
404
|
+
nuVal: {
|
|
405
|
+
'^CSS: “background”: .+ is not a “color” value.*$': {
|
|
406
|
+
quality: 1,
|
|
407
|
+
what: 'CSS background color is misdefined'
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
},
|
|
382
412
|
backgroundImageBad: {
|
|
383
413
|
weight: 4,
|
|
384
414
|
packages: {
|
|
@@ -1485,17 +1515,9 @@ const groups = {
|
|
|
1485
1515
|
weight: 3,
|
|
1486
1516
|
packages: {
|
|
1487
1517
|
nuVal: {
|
|
1488
|
-
'Attribute
|
|
1489
|
-
quality: 1,
|
|
1490
|
-
what: 'name attribute is not allowed on a meta element here'
|
|
1491
|
-
},
|
|
1492
|
-
'Attribute “rel” not allowed on element “meta” at this point.': {
|
|
1493
|
-
quality: 1,
|
|
1494
|
-
what: 'rel attribute is not allowed on a meta element here'
|
|
1495
|
-
},
|
|
1496
|
-
'Attribute “href” not allowed on element “meta” at this point.': {
|
|
1518
|
+
'^Attribute .+ not allowed on element “meta” at this point.*$': {
|
|
1497
1519
|
quality: 1,
|
|
1498
|
-
what: '
|
|
1520
|
+
what: 'Attribute is not allowed on a meta element here'
|
|
1499
1521
|
},
|
|
1500
1522
|
'Element “meta” is missing one or more of the following attributes: “charset”, “content”, “http-equiv”, “itemprop”, “name”, “property”.': {
|
|
1501
1523
|
quality: 1,
|
|
@@ -1505,10 +1527,6 @@ const groups = {
|
|
|
1505
1527
|
quality: 1,
|
|
1506
1528
|
what: 'meta element with name="description" is not the only one'
|
|
1507
1529
|
},
|
|
1508
|
-
'Attribute “http-equiv” not allowed on element “meta” at this point.': {
|
|
1509
|
-
quality: 1,
|
|
1510
|
-
what: 'http-equiv attribute is not allowed on a meta element here'
|
|
1511
|
-
},
|
|
1512
1530
|
'A “meta” element with an “http-equiv” attribute whose value is “X-UA-Compatible” must have a “content” attribute with the value “IE=edge”.': {
|
|
1513
1531
|
quality: 1,
|
|
1514
1532
|
what: 'meta element with http-equiv="X-UA-Compatible" has no content="IE=edge"'
|
|
@@ -1517,6 +1535,10 @@ const groups = {
|
|
|
1517
1535
|
quality: 1,
|
|
1518
1536
|
what: 'meta element is missing an itemprop or property attribute'
|
|
1519
1537
|
},
|
|
1538
|
+
'A “charset” attribute on a “meta” element found after the first 1024 bytes.': {
|
|
1539
|
+
quality: 1,
|
|
1540
|
+
what: 'charset attribute on a meta element appears after 1024 bytes'
|
|
1541
|
+
},
|
|
1520
1542
|
'^Bad value .+ for attribute .+ on element “meta”.*$': {
|
|
1521
1543
|
quality: 1,
|
|
1522
1544
|
what: 'attribute of a meta element has an invalid value'
|
|
@@ -1855,6 +1877,12 @@ const groups = {
|
|
|
1855
1877
|
quality: 1,
|
|
1856
1878
|
what: 'ARIA property value is invalid'
|
|
1857
1879
|
}
|
|
1880
|
+
},
|
|
1881
|
+
nuVal: {
|
|
1882
|
+
'The “aria-hidden” attribute must not be specified on the “noscript” element.': {
|
|
1883
|
+
quality: 1,
|
|
1884
|
+
what: 'noscript element has an aria-hidden attribute'
|
|
1885
|
+
}
|
|
1858
1886
|
}
|
|
1859
1887
|
}
|
|
1860
1888
|
},
|
|
@@ -2071,6 +2099,12 @@ const groups = {
|
|
|
2071
2099
|
what: 'Heading element provides no descriptive text'
|
|
2072
2100
|
}
|
|
2073
2101
|
},
|
|
2102
|
+
nuVal: {
|
|
2103
|
+
'Empty heading.': {
|
|
2104
|
+
quality: 1,
|
|
2105
|
+
what: 'Empty heading'
|
|
2106
|
+
}
|
|
2107
|
+
},
|
|
2074
2108
|
wave: {
|
|
2075
2109
|
'e:heading_empty': {
|
|
2076
2110
|
quality: 1,
|
|
@@ -2268,6 +2302,12 @@ const groups = {
|
|
|
2268
2302
|
what: 'Heading level is incorrect'
|
|
2269
2303
|
}
|
|
2270
2304
|
},
|
|
2305
|
+
nuVal: {
|
|
2306
|
+
'Consider using the “h1” element as a top-level heading only (all “h1” elements are treated as top-level headings by many screen readers and other tools).': {
|
|
2307
|
+
quality: 1,
|
|
2308
|
+
what: 'Page contains more than 1 h1 element'
|
|
2309
|
+
}
|
|
2310
|
+
},
|
|
2271
2311
|
tenon: {
|
|
2272
2312
|
155: {
|
|
2273
2313
|
quality: 1,
|
|
@@ -3540,6 +3580,18 @@ const groups = {
|
|
|
3540
3580
|
'^Attribute .+ not allowed on element .+ at this point.*$': {
|
|
3541
3581
|
quality: 1,
|
|
3542
3582
|
what: 'attribute not allowed on this element'
|
|
3583
|
+
},
|
|
3584
|
+
'^Bad value .+ for attribute .+ on element .+$': {
|
|
3585
|
+
quality: 1,
|
|
3586
|
+
what: 'attribute on this element has an invalid value'
|
|
3587
|
+
},
|
|
3588
|
+
'^Attribute .+ not allowed here.*$': {
|
|
3589
|
+
quality: 1,
|
|
3590
|
+
what: 'Attribute not allowed here'
|
|
3591
|
+
},
|
|
3592
|
+
'^Attribute .+ is not serializable as XML 1\\.0.*$': {
|
|
3593
|
+
quality: 1,
|
|
3594
|
+
what: 'Attribute is invalidly nonserializable'
|
|
3543
3595
|
}
|
|
3544
3596
|
}
|
|
3545
3597
|
}
|
|
@@ -3966,6 +4018,14 @@ const groups = {
|
|
|
3966
4018
|
quality: 1,
|
|
3967
4019
|
what: 'charset attribute has a value other than utf-8 and is unnecessary'
|
|
3968
4020
|
},
|
|
4021
|
+
'The “language” attribute on the “script” element is obsolete. You can safely omit it.': {
|
|
4022
|
+
quality: 1,
|
|
4023
|
+
what: 'language attribute is obsolete on a script element'
|
|
4024
|
+
},
|
|
4025
|
+
'The “language” attribute on the “script” element is obsolete. Use the “type” attribute instead.': {
|
|
4026
|
+
quality: 1,
|
|
4027
|
+
what: 'language attribute is obsolete on a script element'
|
|
4028
|
+
},
|
|
3969
4029
|
'The “frameborder” attribute on the “iframe” element is obsolete. Use CSS instead.': {
|
|
3970
4030
|
quality: 1,
|
|
3971
4031
|
what: 'frameborder attribute is obsolete'
|
|
@@ -3973,6 +4033,14 @@ const groups = {
|
|
|
3973
4033
|
'The “name” attribute is obsolete. Consider putting an “id” attribute on the nearest container instead.': {
|
|
3974
4034
|
quality: 1,
|
|
3975
4035
|
what: 'name attribute is obsolete'
|
|
4036
|
+
},
|
|
4037
|
+
'The “allowtransparency” attribute on the “iframe” element is obsolete. Use CSS instead.': {
|
|
4038
|
+
quality: 1,
|
|
4039
|
+
what: 'allowtransparency attribute on an iframe element is obsolete'
|
|
4040
|
+
},
|
|
4041
|
+
'The “scrolling” attribute on the “iframe” element is obsolete. Use CSS instead.': {
|
|
4042
|
+
quality: 1,
|
|
4043
|
+
what: 'scrolling attribute on an iframe element is obsolete'
|
|
3976
4044
|
}
|
|
3977
4045
|
},
|
|
3978
4046
|
wave: {
|
|
@@ -4007,13 +4075,41 @@ const groups = {
|
|
|
4007
4075
|
quality: 1,
|
|
4008
4076
|
what: 'Invalid flex in CSS'
|
|
4009
4077
|
},
|
|
4078
|
+
'^CSS: “cursor”: .+ is not a “cursor” value.*$': {
|
|
4079
|
+
quality: 1,
|
|
4080
|
+
what: 'Invalid cursor in CSS'
|
|
4081
|
+
},
|
|
4082
|
+
'^CSS: “transform”: .+ is not a “transform” value.*$': {
|
|
4083
|
+
quality: 1,
|
|
4084
|
+
what: 'Invalid transform in CSS'
|
|
4085
|
+
},
|
|
4086
|
+
'^CSS: .+: Property .+ doesn\'t exist.*$': {
|
|
4087
|
+
quality: 1,
|
|
4088
|
+
what: 'Invalid property in CSS'
|
|
4089
|
+
},
|
|
4090
|
+
'^CSS: .+: only “0” can be a “length”. You must put a unit after your number.*$': {
|
|
4091
|
+
quality: 1,
|
|
4092
|
+
what: 'Length in CSS is nonzero but has no unit'
|
|
4093
|
+
},
|
|
4094
|
+
'CSS: Parse Error.': {
|
|
4095
|
+
quality: 1,
|
|
4096
|
+
what: 'Invalid CSS'
|
|
4097
|
+
},
|
|
4010
4098
|
'Stray end tag “head”.': {
|
|
4011
4099
|
quality: 1,
|
|
4012
4100
|
what: 'Invalid closing head tag'
|
|
4013
4101
|
},
|
|
4014
|
-
'Start tag
|
|
4102
|
+
'^Start tag .+ seen but an element of the same type was already open.*$': {
|
|
4103
|
+
quality: 1,
|
|
4104
|
+
what: 'Element is invalidly a descendant of another such element'
|
|
4105
|
+
},
|
|
4106
|
+
'^End tag .+ violates nesting rules.*$': {
|
|
4107
|
+
quality: 1,
|
|
4108
|
+
what: 'End tag violates nesting rules'
|
|
4109
|
+
},
|
|
4110
|
+
'^Element .+ not allowed as child of element .+ in this context.*$': {
|
|
4015
4111
|
quality: 1,
|
|
4016
|
-
what: '
|
|
4112
|
+
what: 'Element not allowed as a child of its parent here'
|
|
4017
4113
|
}
|
|
4018
4114
|
}
|
|
4019
4115
|
}
|