chore: update accessibility baseline and enhance loading waits for a11y tests
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 () => {
|
||||
|
||||
@@ -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 () => {
|
||||
|
||||
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user