fix: correct score calculation in accessibility test

This commit is contained in:
张翔
2026-03-06 10:17:49 +08:00
parent e82f5b26aa
commit 54bdafa47f
+1 -1
View File
@@ -51,7 +51,7 @@ async function runAxeTest(url, pageName) {
}
function calculateScore(violations, passes, incomplete) {
const total = violations.length + passes.length + incomplete.length;
const total = violations.length + passes + incomplete;
if (total === 0) return 100;
return ((passes / total) * 100).toFixed(1);
}