fix: prove resilient keyboard and no-script paths
This commit is contained in:
@@ -78,6 +78,25 @@ test('tabs from the skip link through navigation and every contact action', asyn
|
||||
}
|
||||
});
|
||||
|
||||
test('activating the skip link focuses the visible unobscured portfolio content', async ({
|
||||
page,
|
||||
distUrl,
|
||||
}) => {
|
||||
await page.goto(distUrl, { waitUntil: 'domcontentloaded' });
|
||||
await page.keyboard.press('Tab');
|
||||
await expect(page.locator('.skip-link')).toBeFocused();
|
||||
|
||||
await page.keyboard.press('Enter');
|
||||
|
||||
await expect(page).toHaveURL(`${distUrl}/#portfolio-content`);
|
||||
await expect(page.locator('#portfolio-content')).toBeFocused();
|
||||
await expect(page.locator('#portfolio-content')).toHaveAttribute(
|
||||
'tabindex',
|
||||
'-1',
|
||||
);
|
||||
await assertVisibleUnobscuredFocus(page);
|
||||
});
|
||||
|
||||
test('explicit section activation scrolls to and focuses its heading', async ({
|
||||
page,
|
||||
distUrl,
|
||||
|
||||
Reference in New Issue
Block a user