From 54bdafa47f63afa76a7590214620b4e20593921b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=BF=94?= Date: Fri, 6 Mar 2026 10:17:49 +0800 Subject: [PATCH] fix: correct score calculation in accessibility test --- scripts/utils/axe-runner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/utils/axe-runner.js b/scripts/utils/axe-runner.js index 1026e61..2a16451 100644 --- a/scripts/utils/axe-runner.js +++ b/scripts/utils/axe-runner.js @@ -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); }