(results, url, ignoredRules = new Set())
| 173 | |
| 174 | // Format Axe results for display |
| 175 | function formatAxeResults(results, url, ignoredRules = new Set()) { |
| 176 | let violations = results.violations; |
| 177 | |
| 178 | // Filter out known false positives |
| 179 | violations = filterFalsePositives(violations, ignoredRules); |
| 180 | |
| 181 | if (violations.length === 0) { |
| 182 | return null; |
| 183 | } |
| 184 | |
| 185 | return { |
| 186 | url, |
| 187 | violations: violations.map(v => ({ |
| 188 | id: v.id, |
| 189 | impact: v.impact, |
| 190 | description: v.description, |
| 191 | help: v.help, |
| 192 | helpUrl: v.helpUrl, |
| 193 | nodes: v.nodes.map(n => ({ |
| 194 | html: n.html.slice(0, 200), |
| 195 | target: n.target, |
| 196 | failureSummary: n.failureSummary |
| 197 | })) |
| 198 | })) |
| 199 | }; |
| 200 | } |
| 201 | |
| 202 | // Main test function |
| 203 | async function testAccessibility() { |
no test coverage detected