diff --git a/tests/a11y/a11y-baseline.ts b/tests/a11y/a11y-baseline.ts index f3b268e1..804deac7 100644 --- a/tests/a11y/a11y-baseline.ts +++ b/tests/a11y/a11y-baseline.ts @@ -6,7 +6,38 @@ export interface BaselineEntry { expiresAt?: string; } -export const A11Y_BASELINE: BaselineEntry[] = []; +export const A11Y_BASELINE: BaselineEntry[] = [ + { + ruleId: 'color-contrast', + pages: ['/'], + reason: 'Tailwind blue-500 buttons (#3b82f6) have 3.67:1 contrast with white text; requires design system update', + ticket: '#929', + }, + { + ruleId: 'label', + pages: ['/settings/users', '/security', '/tasks/backups', '/tasks/import/caddyfile', '/tasks/import/crowdsec'], + reason: 'Form inputs missing associated labels; requires frontend component fixes', + ticket: '#929', + }, + { + ruleId: 'button-name', + pages: ['/settings', '/security/headers'], + reason: 'Icon-only buttons missing accessible names; requires aria-label additions', + ticket: '#929', + }, + { + ruleId: 'select-name', + pages: ['/tasks/logs'], + reason: 'Select element missing associated label', + ticket: '#929', + }, + { + ruleId: 'scrollable-region-focusable', + pages: ['/tasks/logs'], + reason: 'Log output container is scrollable but not keyboard-focusable', + ticket: '#929', + }, +]; export function getBaselinedRuleIds(currentPage: string): string[] { return A11Y_BASELINE diff --git a/tests/a11y/certificates.a11y.spec.ts b/tests/a11y/certificates.a11y.spec.ts index 4b0270df..8ee07695 100644 --- a/tests/a11y/certificates.a11y.spec.ts +++ b/tests/a11y/certificates.a11y.spec.ts @@ -1,5 +1,5 @@ import { test } from '../fixtures/a11y'; -import { waitForLoadingComplete } from '../utils/wait-helpers'; +import { waitForLoadingComplete, waitForTableLoad } from '../utils/wait-helpers'; import { expectNoA11yViolations } from '../utils/a11y-helpers'; import { getBaselinedRuleIds } from './a11y-baseline'; @@ -10,6 +10,7 @@ test.describe('Accessibility: Certificates', () => { await test.step('Navigate to certificates', async () => { await page.goto('/certificates'); await waitForLoadingComplete(page); + await waitForTableLoad(page); }); await test.step('Run axe accessibility scan', async () => { diff --git a/tests/a11y/proxy-hosts.a11y.spec.ts b/tests/a11y/proxy-hosts.a11y.spec.ts index 29be2d23..f7a28742 100644 --- a/tests/a11y/proxy-hosts.a11y.spec.ts +++ b/tests/a11y/proxy-hosts.a11y.spec.ts @@ -1,5 +1,5 @@ import { test } from '../fixtures/a11y'; -import { waitForLoadingComplete } from '../utils/wait-helpers'; +import { waitForLoadingComplete, waitForTableLoad } from '../utils/wait-helpers'; import { expectNoA11yViolations } from '../utils/a11y-helpers'; import { getBaselinedRuleIds } from './a11y-baseline'; @@ -10,6 +10,7 @@ test.describe('Accessibility: Proxy Hosts', () => { await test.step('Navigate to proxy hosts', async () => { await page.goto('/proxy-hosts'); await waitForLoadingComplete(page); + await waitForTableLoad(page); }); await test.step('Run axe accessibility scan', async () => { diff --git a/tests/a11y/settings.a11y.spec.ts b/tests/a11y/settings.a11y.spec.ts index e71c9ed8..772df688 100644 --- a/tests/a11y/settings.a11y.spec.ts +++ b/tests/a11y/settings.a11y.spec.ts @@ -1,5 +1,5 @@ import { test } from '../fixtures/a11y'; -import { waitForLoadingComplete } from '../utils/wait-helpers'; +import { waitForLoadingComplete, waitForTableLoad } from '../utils/wait-helpers'; import { expectNoA11yViolations } from '../utils/a11y-helpers'; import { getBaselinedRuleIds } from './a11y-baseline'; @@ -30,6 +30,7 @@ test.describe('Accessibility: Settings', () => { await test.step('Navigate to users', async () => { await page.goto('/settings/users'); await waitForLoadingComplete(page); + await waitForTableLoad(page); }); await test.step('Run axe accessibility scan', async () => {