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:
Jennie Robinson Faber 2026-04-05 21:59:02 +01:00
parent 61c16d8bac
commit c40f2c7c63
35 changed files with 787 additions and 173 deletions

View file

@ -3,12 +3,14 @@ import { test, expect } from './helpers/fixtures.js'
test.describe('Member profile page', () => {
test('profile page loads', async ({ adminPage }) => {
await adminPage.goto('/member/profile')
await expect(adminPage.getByText('Edit Profile')).toBeVisible()
// Auth is checked client-side in onMounted — wait for profile form to render
await expect(adminPage.getByText('Edit Profile')).toBeVisible({ timeout: 15000 })
await expect(adminPage.getByText('How you appear to other members')).toBeVisible()
})
test('form fields are present', async ({ adminPage }) => {
await adminPage.goto('/member/profile')
await expect(adminPage.getByText('Edit Profile')).toBeVisible({ timeout: 15000 })
// Name input
await expect(adminPage.locator('input[placeholder="Your name"]')).toBeVisible()
@ -22,6 +24,7 @@ test.describe('Member profile page', () => {
test('bio field accepts input', async ({ adminPage }) => {
await adminPage.goto('/member/profile')
await expect(adminPage.getByText('Edit Profile')).toBeVisible({ timeout: 15000 })
const bio = adminPage.locator('textarea[placeholder*="Share your background"]')
const saveBtn = adminPage.getByRole('button', { name: 'Save Profile' })
@ -39,6 +42,7 @@ test.describe('Member profile page', () => {
test('pronouns field editable', async ({ adminPage }) => {
await adminPage.goto('/member/profile')
await expect(adminPage.getByText('Edit Profile')).toBeVisible({ timeout: 15000 })
const pronouns = adminPage.locator('input[placeholder="e.g., she/her, they/them"]')
await expect(pronouns).toBeVisible()