testaro 35.0.7 → 35.0.9
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/testaro/lineHeight.js +2 -2
- package/tests/alfa.js +10 -1
package/package.json
CHANGED
package/testaro/lineHeight.js
CHANGED
|
@@ -49,8 +49,8 @@ exports.reporter = async (page, withItems) => {
|
|
|
49
49
|
lineHeight: Number.parseFloat(lineHeight)
|
|
50
50
|
};
|
|
51
51
|
});
|
|
52
|
-
// If it does:
|
|
53
|
-
const isBad = data.lineHeight < 1.
|
|
52
|
+
// If it does, after a grace margin for rounding:
|
|
53
|
+
const isBad = data.lineHeight < 1.49 * data.fontSize;
|
|
54
54
|
if (isBad) {
|
|
55
55
|
// Add the locator to the array of violators.
|
|
56
56
|
all.locs.push([loc, `font size ${data.fontSize} px, line height ${data.lineHeight} px`]);
|
package/tests/alfa.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
© 2021–
|
|
2
|
+
© 2021–2024 CVS Health and/or one of its affiliates. All rights reserved.
|
|
3
3
|
|
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
5
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -123,6 +123,15 @@ exports.reporter = async (page, options) => {
|
|
|
123
123
|
codeLines: codeLines.map(line => line.length > 300 ? `${line.slice(0, 300)}...` : line)
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
|
+
// If the rule summary is missing:
|
|
127
|
+
if (outcomeData.rule.ruleSummary === '') {
|
|
128
|
+
// If a first requirement title exists:
|
|
129
|
+
const {requirements} = outcomeData.rule;
|
|
130
|
+
if (requirements && requirements.length && requirements[0].title) {
|
|
131
|
+
// Make it the rule summary.
|
|
132
|
+
outcomeData.rule.ruleSummary = requirements[0].title;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
126
135
|
const etcTags = [];
|
|
127
136
|
tags.forEach(tag => {
|
|
128
137
|
if (tag.type === 'scope') {
|