Releases: lpelypenko/axe-html-reporter
Releases · lpelypenko/axe-html-reporter
Added return of HTML file content and option to stop html file creation
New feature that opens more usages of this library:
From version 2.2.3, createHtmlReport(...)
returns HTML content that can be additionally used for specific integrations.
If only HTML content is needed, user can pass doNotCreateReportFile: true
to stop report file creation.
Suggestion on how to use this library if you don't need a report file but need only HTML it produces:
const reportHTML = createHtmlReport({
results: rawAxeResults,
options: {
projectKey: 'I need only raw HTML',
doNotCreateReportFile: true,
},
});
console.log('reportHTML will have full content of HTML file.');
// suggestion on how to create file by yourself
if (!fs.existsSync('build/reports/saveReportHere.html')) {
fs.mkdirSync('build/reports', {
recursive: true,
});
}
fs.writeFileSync('build/reports/saveReportHere.html', reportHTML);
Allow absolute path option
New optional param was introduced to allow absolute path:
outputDirPath
createHtmlReport({
results: 'AxeResults',
options: {
projectKey: 'JIRA_PROJECT_KEY',
outputDir: 'axe-reports',
outputDirPath: '../..',
reportFileName: 'exampleReport.html',
},
});
Add raw axe tags and extended WCAG with sub-sections
Improved Violations(Failed) section
2.0.0 Full AxeResults object and Rules in report
New release contains major change that affects createHtmlReport
function signature.
createHtmlReport
now accepts fullAxeResult
object inresults
parameter- all other options moved to
options
parameter that is optional - axeResult rules object is now included in HTML report
Published missing dist files
1.2.1 Added support of customSummary, updated tests and docs
Added custom summary support (optional)
If use passed customSummary
it will appear bellow Page URL:
const customSummary = `Test Case: Full page analysis
<br>Steps:</br>
<ol style="margin: 0">
<li>Open https://dequeuniversity.com/demo/mars/</li>
<li>Analyze full page with all rules enabled</li>
</ol>`;
createHtmlReport({
violations: axeRawViolations,
url: 'https://dequeuniversity.com/demo/mars/',
customSummary
});
Added inapplicable axe result support
- Added inapplicable axe result support
- Improved logic
- Added more tests