Skip to content

Commit 9eae653

Browse files
Split server-dependent demos from public demo
Move the a11y and Learnosity parity harnesses into dedicated apps, and make the public demo static/hosted-IIFE friendly for GitHub Pages deployment. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 243420b commit 9eae653

311 files changed

Lines changed: 18565 additions & 238 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
description: Guidance for maintaining the PIE accessibility scenario suite
3-
globs: apps/element-demo/src/lib/a11y/**, apps/element-demo/test/a11y/**, apps/element-demo/src/lib/samples/**, docs/a11y/**
3+
globs: apps/element-a11y-demo/src/lib/a11y/**, apps/element-a11y-demo/test/a11y/**, apps/element-a11y-demo/src/lib/samples/**, docs/a11y/**
44
alwaysApply: false
55
---
66

77
# Accessibility Scenario Suite
88

99
- Treat WCAG 2.2 Level AA as the target when adding or reviewing PIE element accessibility scenarios.
1010
- Use `.claude/skills/accessibility-reviewer-assessments/SKILL.md` for the detailed assessment-specific checklist.
11-
- Prefer dedicated a11y scenarios in `apps/element-demo/src/lib/a11y/scenarios/catalog.ts` over broad demo inventory coverage.
11+
- Prefer dedicated a11y scenarios in `apps/element-a11y-demo/src/lib/a11y/scenarios/catalog.ts` over broad demo inventory coverage.
1212
- Keep automated scope explicit: document Axe-covered checks, custom Playwright checks, manual-only concerns, and unclear gaps in `docs/a11y/`.
13-
- Add reusable checks in `apps/element-demo/test/a11y/axe-scenarios.spec.ts` only when the concern applies across multiple elements.
13+
- Add reusable checks in `apps/element-a11y-demo/test/a11y/axe-scenarios.spec.ts` only when the concern applies across multiple elements.
1414
- Do not edit synced outputs in `packages/elements-react/*` or `packages/lib-react/*`; fix upstream first or document the issue for follow-up.

.github/workflows/a11y.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
bun-version: 1.3.13
2323
- run: bun install --frozen-lockfile
2424
- run: bun x svelte-kit sync
25-
working-directory: apps/element-demo
26-
- run: bun run --cwd apps/element-demo generate-imports
27-
- run: bun run build
25+
working-directory: apps/element-a11y-demo
26+
- run: bun run --cwd apps/element-a11y-demo generate-imports
27+
- run: bun run --cwd apps/element-a11y-demo build
2828
- run: bunx playwright install --with-deps
2929
- run: bun run test:a11y
3030
- run: bun run test:a11y:inventory
@@ -33,7 +33,7 @@ jobs:
3333
with:
3434
name: axe-a11y-reports
3535
path: |
36-
apps/element-demo/test-results/a11y/
37-
apps/element-demo/playwright-a11y-report/
36+
apps/element-a11y-demo/test-results/a11y/
37+
apps/element-a11y-demo/playwright-a11y-report/
3838
if-no-files-found: warn
3939
retention-days: 30

.github/workflows/pages.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [master]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: pages
10+
cancel-in-progress: false
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 20.x
25+
- uses: oven-sh/setup-bun@v2
26+
with:
27+
bun-version: 1.3.13
28+
- uses: actions/configure-pages@v5
29+
- run: bun install --frozen-lockfile
30+
- run: bun run build
31+
env:
32+
PUBLIC_ELEMENT_DEMO_STATIC: "true"
33+
PUBLIC_ELEMENT_DEMO_IIFE_BUNDLE_MODE: hosted
34+
- uses: actions/upload-pages-artifact@v3
35+
with:
36+
path: apps/element-demo/build
37+
38+
deploy:
39+
needs: build
40+
runs-on: ubuntu-latest
41+
steps:
42+
- id: deployment
43+
uses: actions/deploy-pages@v4
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "@pie-element/element-a11y-demo",
3+
"version": "0.1.1",
4+
"private": true,
5+
"description": "Dedicated SvelteKit app for PIE accessibility scenario demos",
6+
"type": "module",
7+
"scripts": {
8+
"dev": "vite dev",
9+
"prebuild": "bun run generate-imports && bun run --cwd ../.. verify:no-local-paths apps/element-a11y-demo/src/lib/element-imports.js apps/element-a11y-demo/src/lib/element-imports.d.ts",
10+
"build": "vite build",
11+
"preview": "vite preview",
12+
"generate-imports": "bun run scripts/generate-element-imports.ts",
13+
"predev": "bun run generate-imports && bun run --cwd ../.. verify:no-local-paths apps/element-a11y-demo/src/lib/element-imports.js apps/element-a11y-demo/src/lib/element-imports.d.ts",
14+
"test:a11y": "playwright test --config=playwright.a11y.config.ts",
15+
"test:a11y:inventory": "A11Y_SUITE=inventory playwright test --config=playwright.a11y.config.ts",
16+
"test:a11y:ui": "playwright test --config=playwright.a11y.config.ts --ui",
17+
"test:a11y:headed": "playwright test --config=playwright.a11y.config.ts --headed"
18+
},
19+
"dependencies": {
20+
"@pie-element/element-bundler": "workspace:*",
21+
"@pie-element/element-theme-daisyui": "workspace:*",
22+
"@pie-element/element-player": "workspace:*",
23+
"@tiptap/core": "3.18.0",
24+
"@tiptap/extension-code-block-lowlight": "3.18.0",
25+
"@tiptap/extension-document": "3.18.0",
26+
"@tiptap/extension-history": "3.18.0",
27+
"@tiptap/extension-text": "3.18.0",
28+
"debug": "^4.4.3",
29+
"highlight.js": "^11.11.1",
30+
"lowlight": "^3.3.0"
31+
},
32+
"devDependencies": {
33+
"@pie-element/cli": "workspace:*",
34+
"@pie-element/multiple-choice": "workspace:*",
35+
"@pie-element/shared-math-rendering-mathjax": "workspace:*",
36+
"@sveltejs/adapter-static": "^3.0.10",
37+
"@sveltejs/kit": "^2.55.0",
38+
"@sveltejs/vite-plugin-svelte": "^7.0.0",
39+
"@tailwindcss/vite": "^4.2.2",
40+
"@vitejs/plugin-react": "^6.0.1",
41+
"daisyui": "^5.5.19",
42+
"svelte": "^5.54.0",
43+
"tailwindcss": "^4.2.2",
44+
"typescript": "^5.9.3",
45+
"vite": "^8.0.1"
46+
}
47+
}

apps/element-a11y-demo/playwright-a11y-report/scenarios/index.html

Lines changed: 90 additions & 0 deletions
Large diffs are not rendered by default.

apps/element-demo/playwright.a11y.config.ts renamed to apps/element-a11y-demo/playwright.a11y.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export default defineConfig({
8888
timeout: 10_000,
8989
},
9090
use: {
91-
baseURL: 'http://localhost:5222',
91+
baseURL: 'http://localhost:5223',
9292
trace: 'retain-on-failure',
9393
screenshot: 'only-on-failure',
9494
actionTimeout: 10_000,
@@ -105,7 +105,7 @@ export default defineConfig({
105105
? undefined
106106
: {
107107
command: 'bun run dev',
108-
url: 'http://localhost:5222',
108+
url: 'http://localhost:5223',
109109
reuseExistingServer: true,
110110
timeout: 120_000,
111111
},

0 commit comments

Comments
 (0)