feat(a11y): add axe-core Playwright scorecard for 10 key routes
- Installs @axe-core/playwright at workspace root - Creates e2e/a11y/scorecard.spec.ts scanning /, /search, /listings/[id], /listings/create, /login, /register, /dashboard, /agent/[id], /inquiries, /admin/moderation - API mock layer lets pages render with stubbed JSON so axe sees real DOM - Critical/serious violations fail the build; moderate/minor are recorded only - Writes per-route JSON reports to e2e/a11y/reports/ (committed for before/after diffing in PRs) - Adds dedicated "a11y" Playwright project in playwright.config.ts - Pre-existing API unit test failures are unrelated to this change Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -76,6 +76,15 @@ export default defineConfig({
|
||||
baseURL: process.env.WEB_BASE_URL ?? `http://localhost:${WEB_PORT}`,
|
||||
},
|
||||
},
|
||||
// Accessibility scorecard — axe-core audit of 10 key routes
|
||||
{
|
||||
name: 'a11y',
|
||||
testDir: './e2e/a11y',
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
baseURL: process.env.WEB_BASE_URL ?? `http://localhost:${WEB_PORT}`,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
webServer: [
|
||||
|
||||
Reference in New Issue
Block a user