paypal / AATT

Automated Accessibility Testing Tool
BSD 3-Clause "New" or "Revised" License
602 stars 106 forks source link

Lack of results for node module #61

Open Zack24441 opened 3 years ago

Zack24441 commented 3 years ago

Hi,

I tried to use aatt node module like below:

 const content = await testPage.content();
    const result = await evaluate({
      source: content,
      output: "html",
      engine: "axe",
      level: "WCAG2A"
    });
    await fs.writeFile('./aatt-report.html', result,{}, (err)=>{
      if (err) throw err;
    });

testPage is object Page from Playwright framework.

Current results for each engine:

Could please tell what is wrong?

Versions: "playwright": "^1.12.3", "aatt": "^1.0.1",

Thanks!

mpnkhan commented 3 years ago

Some problem with axe engine it seems. For now use htmlcs instead.

const { evaluate } = require('aatt');
const fs = require('fs');
evaluate({
    source: "<html xml:lang='en-gb'><head><title>Foo</title></head><body><p>Bar</p></body></html>",
    output: "json",
    engine: "htmlcs",
    level: "WCAG2A"
}).then(result => {
    console.log('Results', result);
        fs.writeFile('./aatt-report.html', result,{}, (err)=>{
         if (err) throw err;
         });

});