test: add axe a11y pass and device visual regression (phase 4c)

Add scoped axe accessibility audit (a11y.spec.ts, device-a11y.spec.ts)
scanning home, one tool per modality, editor, and login across desktop
chromium and mobile-chromium in EN and AR locales. Uses a committed
baseline (a11y-baseline.json) to gate on NEW critical/serious violations
while documenting existing debt.

Add device-visual.spec.ts with curated screenshots (home, resize tool,
settings dialog) on mobile-chromium and tablet-chromium. Six darwin
baselines generated; linux baselines deferred to the existing
update-visual-baselines workflow.

Trivial a11y fixes applied:
- Login page: outer div -> main (fixes landmark-one-main, reduces region)
- Editor page: outer div -> main for both desktop and mobile gate
- AppLayout main: add tabIndex={-1} for skip-link focusability

Updated DEVICE_SPECS regex to route device-visual and device-a11y specs.
Added @axe-core/playwright as a devDependency.
This commit is contained in:
SnapOtter
2026-06-20 03:44:26 +08:00
parent 692c8ebf91
commit 0705de8f1b
17 changed files with 27491 additions and 8 deletions
+19
View File
@@ -43,6 +43,9 @@ importers:
specifier: ^3.2.2
version: 3.2.2(react@19.2.7)
devDependencies:
'@axe-core/playwright':
specifier: ^4.11.3
version: 4.11.3(playwright-core@1.60.0)
'@biomejs/biome':
specifier: ^2.5.0
version: 2.5.0
@@ -906,6 +909,11 @@ packages:
resolution: {integrity: sha512-iY8yvjE0y651BixKNPgmv1WrQc+GZ142sb0z4gYnChDDY2YqI4P/jsSopBWrKfAt7LOJAkOXt7rC/hms+WclQQ==}
engines: {node: '>=18.0.0'}
'@axe-core/playwright@4.11.3':
resolution: {integrity: sha512-h/kfksv4F0cVIDlKpT4700OehdRgpvuVskuQ2nb7/JmtWUXpe9ftHAPtwyXGvVSsa6SJ64A9ER7Zrzc/sIvC4w==}
peerDependencies:
playwright-core: '>= 1.0.0'
'@babel/code-frame@7.29.0':
resolution: {integrity: sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==}
engines: {node: '>=6.9.0'}
@@ -4036,6 +4044,10 @@ packages:
avvio@9.2.0:
resolution: {integrity: sha512-2t/sy01ArdHHE0vRH5Hsay+RtCZt3dLPji7W7/MMOCEgze5b7SNDC4j5H6FnVgPkI1MTNFGzHdHrVXDDl7QSSQ==}
axe-core@4.11.4:
resolution: {integrity: sha512-KunSNx+TVpkAw/6ULfhnx+HWRecjqZGTOyquAoWHYLRSdK1tB5Ihce1ZW+UY3fj33bYAFWPu7W/GRSmmrCGuxA==}
engines: {node: '>=4'}
axobject-query@4.1.0:
resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==}
engines: {node: '>= 0.4'}
@@ -8919,6 +8931,11 @@ snapshots:
'@aws/lambda-invoke-store@0.2.4': {}
'@axe-core/playwright@4.11.3(playwright-core@1.60.0)':
dependencies:
axe-core: 4.11.4
playwright-core: 1.60.0
'@babel/code-frame@7.29.0':
dependencies:
'@babel/helper-validator-identifier': 7.28.5
@@ -12505,6 +12522,8 @@ snapshots:
'@fastify/error': 4.2.0
fastq: 1.20.1
axe-core@4.11.4: {}
axobject-query@4.1.0: {}
b4a@1.8.0: {}