test(a11y): add A3e-A3f cycling toggle aria-expanded tests (italy-2026-demo)
This commit is contained in:
@@ -53,6 +53,22 @@ test('A3d: clicking Stats toggle sets aria-expanded="true" then back to false',
|
|||||||
await expect(page.locator('#trip-stats-toggle')).toHaveAttribute('aria-expanded', 'false');
|
await expect(page.locator('#trip-stats-toggle')).toHaveAttribute('aria-expanded', 'false');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const ITALY_URL = '/trips/italy-2026-demo';
|
||||||
|
|
||||||
|
test('A3e: Cycling toggle has aria-expanded="false" and aria-controls on load', async ({ page }) => {
|
||||||
|
await page.goto(ITALY_URL);
|
||||||
|
await expect(page.locator('#trip-cycling-toggle')).toHaveAttribute('aria-expanded', 'false');
|
||||||
|
await expect(page.locator('#trip-cycling-toggle')).toHaveAttribute('aria-controls', 'trip-cycling-block');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('A3f: clicking Cycling toggle sets aria-expanded="true" then back to false', async ({ page }) => {
|
||||||
|
await page.goto(ITALY_URL);
|
||||||
|
await page.click('#trip-cycling-toggle');
|
||||||
|
await expect(page.locator('#trip-cycling-toggle')).toHaveAttribute('aria-expanded', 'true');
|
||||||
|
await page.click('#trip-cycling-toggle');
|
||||||
|
await expect(page.locator('#trip-cycling-toggle')).toHaveAttribute('aria-expanded', 'false');
|
||||||
|
});
|
||||||
|
|
||||||
// ── A4: Photo strip keyboard navigation ───────────────────────────────────────
|
// ── A4: Photo strip keyboard navigation ───────────────────────────────────────
|
||||||
test('A4a: all photo strips have role=region and aria-label', async ({ page }) => {
|
test('A4a: all photo strips have role=region and aria-label', async ({ page }) => {
|
||||||
await page.goto('/trips/japan-korea-2026/dailies');
|
await page.goto('/trips/japan-korea-2026/dailies');
|
||||||
|
|||||||
Reference in New Issue
Block a user