test(a11y): add A1 skip link test
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// @ts-check
|
||||
// Tests: A1–A5 (feature checks) and AX1–AX5 (axe scans)
|
||||
const { test, expect } = require('@playwright/test');
|
||||
|
||||
// ── A1: Skip link ──────────────────────────────────────────────────────────────
|
||||
test('A1: skip link targets #main-content and is first focusable element', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
const skipLink = page.locator('.skip-link');
|
||||
await expect(skipLink).toBeAttached();
|
||||
await expect(skipLink).toHaveAttribute('href', '#main-content');
|
||||
await expect(page.locator('#main-content')).toBeAttached();
|
||||
});
|
||||
Reference in New Issue
Block a user