fix: accessibility improvements and test infrastructure hardening
Add aria-labels to form controls (selects, checkboxes, switches), set html lang attribute and page title, fix color contrast for --candle-dim and --text-faint tokens, underline inline links, remove opacity hack. Harden dev login endpoints with atomic findOneAndUpdate and tokenVersion in JWT. Update Playwright timeouts and E2E test helpers.
This commit is contained in:
parent
61c16d8bac
commit
c40f2c7c63
35 changed files with 787 additions and 173 deletions
|
|
@ -100,13 +100,16 @@ test.describe('keyboard navigation', () => {
|
|||
|
||||
test('escape closes login modal', async ({ page }) => {
|
||||
await page.goto('/member/dashboard')
|
||||
// Wait for login modal to appear
|
||||
const modal = page.locator('text=Sign in to continue').or(page.locator('text=Sign in to your dashboard'))
|
||||
await expect(modal.first()).toBeVisible({ timeout: 10000 })
|
||||
// Wait for the sign-in prompt to appear, then click to open the modal
|
||||
await expect(page.getByRole('button', { name: 'Sign In' })).toBeVisible({ timeout: 10000 })
|
||||
await page.getByRole('button', { name: 'Sign In' }).click()
|
||||
|
||||
const modalTitle = page.locator('.modal-title')
|
||||
await expect(modalTitle).toBeVisible({ timeout: 5000 })
|
||||
|
||||
await page.keyboard.press('Escape')
|
||||
|
||||
// Modal should close
|
||||
await expect(modal.first()).not.toBeVisible({ timeout: 5000 })
|
||||
await expect(modalTitle).not.toBeVisible({ timeout: 5000 })
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue