13 lines
692 B
JavaScript
13 lines
692 B
JavaScript
// @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();
|
||
});
|