Skip to content

Commit 1651e27

Browse files
committed
chore(a11y-testing-spike): move implementation to 2nd gen, move docs
1 parent 4add55b commit 1651e27

File tree

17 files changed

+673
-562
lines changed

17 files changed

+673
-562
lines changed

1st-gen/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@
6262
"storybook:quick": "run-p build:watch storybook:run",
6363
"storybook:run": "web-dev-server --config wds-storybook.config.js",
6464
"test": "yarn test:focus unit",
65-
"test:a11y": "playwright test --config=playwright.a11y.config.ts",
66-
"test:a11y:ui": "playwright test --config=playwright.a11y.config.ts --ui",
67-
"test:a11y:1st": "playwright test --config=playwright.a11y.config.ts --project=1st-gen",
68-
"test:a11y:2nd": "playwright test --config=playwright.a11y.config.ts --project=2nd-gen",
69-
"test:a11y:report": "playwright show-report test/playwright-a11y/report",
65+
"test:a11y": "playwright test --config=../2nd-gen/playwright.a11y.config.ts",
66+
"test:a11y:1st": "playwright test --config=../2nd-gen/playwright.a11y.config.ts --project=1st-gen",
67+
"test:a11y:2nd": "playwright test --config=../2nd-gen/playwright.a11y.config.ts --project=2nd-gen",
68+
"test:a11y:report": "playwright show-report ../2nd-gen/test/playwright-a11y/report",
69+
"test:a11y:ui": "playwright test --config=../2nd-gen/playwright.a11y.config.ts --ui",
7070
"test:bench": "yarn build:tests && node test/benchmark/cli.js",
7171
"test:changed": "node ./scripts/test-changes.js",
7272
"test:ci": "yarn test:start",

1st-gen/packages/badge/test/badge.a11y.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import { expect, test } from '@playwright/test';
1414
import AxeBuilder from '@axe-core/playwright';
15-
import { gotoStory } from '../../../test/a11y-helpers.js';
15+
import { gotoStory } from '../../../../2nd-gen/test/a11y-helpers.js';
1616

1717
/**
1818
* Accessibility tests for Badge component

1st-gen/packages/status-light/test/status-light.a11y.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import { expect, test } from '@playwright/test';
1414
import AxeBuilder from '@axe-core/playwright';
15-
import { gotoStory } from '../../../test/a11y-helpers.js';
15+
import { gotoStory } from '../../../../2nd-gen/test/a11y-helpers.js';
1616

1717
/**
1818
* Accessibility tests for Status Light component

1st-gen/tsconfig-all.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4-
"rootDir": "./",
4+
"emitDeclarationOnly": false,
55
"noEmit": true,
6-
"emitDeclarationOnly": false
6+
"rootDir": "./"
77
},
8-
"include": [
9-
"packages/**/*.ts",
10-
"tools/**/*.ts",
11-
"projects/story-decorator/**/*.ts",
12-
"projects/vrt-compare/**/*.ts"
13-
],
148
"exclude": [
159
"packages/*/node_modules/**/*.ts",
1610
"tools/*/node_modules/**/*.ts",
1711
"packages/**/test/*.a11y.spec.ts",
1812
"test/**/*.ts"
1913
],
14+
"include": [
15+
"packages/**/*.ts",
16+
"tools/**/*.ts",
17+
"projects/story-decorator/**/*.ts",
18+
"projects/vrt-compare/**/*.ts"
19+
],
2020
"references": [
2121
{
2222
"path": "packages/accordion"

2nd-gen/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,19 @@
2424
"start": "run-p dev:core dev:analyze storybook",
2525
"storybook": "yarn workspace @adobe/swc storybook",
2626
"storybook:build": "yarn workspace @adobe/swc storybook:build",
27-
"test": "yarn workspace @adobe/swc test"
27+
"test": "yarn workspace @adobe/swc test",
28+
"test:a11y": "playwright test --config=playwright.a11y.config.ts",
29+
"test:a11y:1st": "playwright test --config=playwright.a11y.config.ts --project=1st-gen",
30+
"test:a11y:2nd": "playwright test --config=playwright.a11y.config.ts --project=2nd-gen",
31+
"test:a11y:report": "playwright show-report test/playwright-a11y/report",
32+
"test:a11y:ui": "playwright test --config=playwright.a11y.config.ts --ui"
2833
},
2934
"workspaces": [
3035
"packages/*"
3136
],
3237
"devDependencies": {
38+
"@axe-core/playwright": "^4.11.0",
39+
"@playwright/test": "1.53.1",
3340
"eslint": "8.57.1",
3441
"eslint-plugin-simple-import-sort": "12.1.1",
3542
"npm-run-all2": "8.0.4"

2nd-gen/packages/swc/components/badge/test/badge.a11y.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import AxeBuilder from '@axe-core/playwright';
1414
import { expect, test } from '@playwright/test';
1515

16-
import { gotoStory } from '../../../../../../1st-gen/test/a11y-helpers.js';
16+
import { gotoStory } from '../../../../../test/a11y-helpers.js';
1717

1818
/**
1919
* Accessibility tests for Badge component (2nd Generation)

2nd-gen/packages/swc/components/status-light/test/status-light.a11y.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import AxeBuilder from '@axe-core/playwright';
1414
import { expect, test } from '@playwright/test';
1515

16-
import { gotoStory } from '../../../../../../1st-gen/test/a11y-helpers.js';
16+
import { gotoStory } from '../../../../../test/a11y-helpers.js';
1717

1818
/**
1919
* Accessibility tests for Status Light component (2nd Generation)

1st-gen/playwright.a11y.config.ts renamed to 2nd-gen/playwright.a11y.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const config: PlaywrightTestConfig = {
3232
projects: [
3333
{
3434
name: '1st-gen',
35-
testDir: './',
35+
testDir: '../1st-gen/',
3636
testMatch: '**/packages/*/test/**/*.a11y.spec.ts',
3737
use: {
3838
...devices['Desktop Chrome'],
@@ -41,7 +41,7 @@ const config: PlaywrightTestConfig = {
4141
},
4242
{
4343
name: '2nd-gen',
44-
testDir: '../2nd-gen/',
44+
testDir: './',
4545
testMatch: '**/packages/swc/components/*/test/**/*.a11y.spec.ts',
4646
use: {
4747
...devices['Desktop Chrome'],
@@ -52,13 +52,13 @@ const config: PlaywrightTestConfig = {
5252

5353
webServer: [
5454
{
55-
command: 'yarn storybook',
55+
command: 'cd ../1st-gen && yarn storybook',
5656
port: 8080,
5757
reuseExistingServer: !process.env.CI,
5858
timeout: 120 * 1000,
5959
},
6060
{
61-
command: 'cd ../2nd-gen/packages/swc && yarn storybook',
61+
command: 'cd packages/swc && yarn storybook',
6262
port: 6006,
6363
reuseExistingServer: !process.env.CI,
6464
timeout: 120 * 1000,
File renamed without changes.

@

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
chore(a11y-testing-spike): move implementation to 2nd gen, move docs
2+
3+
# Please enter the commit message for your changes. Lines starting
4+
# with '#' will be ignored, and an empty message aborts the commit.
5+
#
6+
# Date: Tue Nov 4 15:16:43 2025 -0800
7+
#
8+
# interactive rebase in progress; onto 4266ccd96e
9+
# Last commands done (2 commands done):
10+
# pick c6e0dc9c05 # chore(a11y-testing-spike): move implementation to 2nd gen, move docs
11+
# squash a664498355 # chore(a11y-testing-spike): move implementation to 2nd gen, move docs
12+
# No commands remaining.
13+
# You are currently rebasing branch 'cdransf/a11y-testing-spike' on '4266ccd96e'.
14+
#
15+
# Changes to be committed:
16+
# modified: 1st-gen/package.json
17+
# modified: 1st-gen/packages/badge/test/badge.a11y.spec.ts
18+
# modified: 1st-gen/packages/status-light/test/status-light.a11y.spec.ts
19+
# modified: 2nd-gen/package.json
20+
# modified: 2nd-gen/packages/swc/components/badge/test/badge.a11y.spec.ts
21+
# modified: 2nd-gen/packages/swc/components/status-light/test/status-light.a11y.spec.ts
22+
# renamed: 1st-gen/playwright.a11y.config.ts -> 2nd-gen/playwright.a11y.config.ts
23+
# renamed: 1st-gen/test/a11y-helpers.ts -> 2nd-gen/test/a11y-helpers.ts
24+
# modified: CONTRIBUTOR-DOCS/01_contributor-guides/03_working-in-the-swc-repo.md
25+
# modified: CONTRIBUTOR-DOCS/01_contributor-guides/06_releasing-swc.md
26+
# renamed: ACCESSIBILITY_TESTING.md -> CONTRIBUTOR-DOCS/01_contributor-guides/09_accessibility-testing.md
27+
# modified: CONTRIBUTOR-DOCS/01_contributor-guides/README.md
28+
# modified: CONTRIBUTOR-DOCS/README.md
29+
# modified: yarn.lock
30+
#

0 commit comments

Comments
 (0)