[LON-CAPA-cvs] cvs: loncom /node.js/axe axeperl.js

raeburn raeburn at source.lon-capa.org
Sun Aug 2 18:06:52 EDT 2026


raeburn		Sun Aug  2 22:06:52 2026 EDT

  Modified files:              
    /loncom/node.js/axe	axeperl.js 
  Log:
  - During accessibility testing retrieve data about incomplete tests as well
    as completed tests featuring non-compliance.
  
  
Index: loncom/node.js/axe/axeperl.js
diff -u loncom/node.js/axe/axeperl.js:1.3 loncom/node.js/axe/axeperl.js:1.4
--- loncom/node.js/axe/axeperl.js:1.3	Sat Jul 25 12:10:18 2026
+++ loncom/node.js/axe/axeperl.js	Sun Aug  2 22:06:52 2026
@@ -1,5 +1,5 @@
 //
-// $Id: axeperl.js,v 1.3 2026/07/25 12:10:18 raeburn Exp $
+// $Id: axeperl.js,v 1.4 2026/08/02 22:06:52 raeburn Exp $
 //
 // This is a javascript library for accessibility testing of
 // LON-CAPA resources rendered for the web target.  It relies
@@ -109,12 +109,17 @@
   await page.goto(url);
   const results = await new AxePuppeteer(page).withTags(tags).analyze();
   const violations = results.violations;
-  const count = violations.length;
-  if (count > 0) {
-    console.log(count+' '+JSON.stringify(violations));
+  const broken = violations.length;
+  const incompletes = results.incomplete;
+  const skip = incompletes.length;
+  if ((broken > 0) || (skip > 0)) {
+    console.log(broken+',V,'+JSON.stringify(violations));
+    console.log(skip+',I,'+JSON.stringify(incompletes));
   } else {
-    console.log(count);
+    console.log('0');
   }
+  console.log(''); // Signals to AxeRunner::checkcompliance() to exit its while() loop.
+                   // DO NOT REMOVE.
   await page.close();
 }
 




More information about the LON-CAPA-cvs mailing list