Skip to content

Commit ea27024

Browse files
committed
chore: organize WCAG checks by page
1 parent 2c023f4 commit ea27024

16 files changed

Lines changed: 136 additions & 61 deletions

File tree

‎.github/workflows/accessibility-e2e.yml‎

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ name: WCAG Accessibility E2E
33
on:
44
push:
55
branches: ["chore/add-wcag-checker"]
6+
workflow_dispatch:
7+
inputs:
8+
page:
9+
description: Page to scan at both WCAG levels
10+
required: true
11+
default: all
12+
type: choice
13+
options:
14+
- all
15+
- sign-in
16+
- home
17+
- studio
18+
- agents
19+
- knowledge
20+
- integrations
621

722
permissions:
823
contents: read
@@ -13,17 +28,12 @@ concurrency:
1328

1429
jobs:
1530
accessibility:
16-
name: WCAG Level ${{ matrix.label }} Accessibility
31+
name: WCAG Level ${{ matrix.label }} · ${{ github.event_name == 'push' && 'home' || inputs.page || 'all pages' }}
1732
runs-on: depot-ubuntu-24.04-4
1833
timeout-minutes: 120
1934
strategy:
2035
fail-fast: false
21-
matrix:
22-
include:
23-
- level: a
24-
label: A
25-
- level: aa
26-
label: AA
36+
matrix: ${{ fromJSON(github.event_name == 'push' && '{"include":[{"level":"aa","label":"AA"}]}' || '{"include":[{"level":"a","label":"A"},{"level":"aa","label":"AA"}]}') }}
2737
defaults:
2838
run:
2939
shell: bash
@@ -61,21 +71,27 @@ jobs:
6171
E2E_ADMIN_PASSWORD: E2eAdmin12345
6272
E2E_FORCE_WEB_BUILD: "1"
6373
E2E_INIT_PASSWORD: E2eInit12345
64-
run: vp run e2e:accessibility:${{ matrix.level }}
74+
WCAG_PAGE: ${{ github.event_name == 'push' && 'home' || inputs.page || 'all' }}
75+
run: |
76+
if [[ "$WCAG_PAGE" == "all" ]]; then
77+
vp run e2e:accessibility:${{ matrix.level }}
78+
else
79+
pnpm exec tsx ./scripts/run-cucumber.ts --full -- --tags "@wcag-${{ matrix.level }} and @wcag-page-$WCAG_PAGE"
80+
fi
6581
6682
- name: Upload accessibility Cucumber report
6783
if: ${{ !cancelled() }}
6884
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
6985
with:
70-
name: cucumber-report-accessibility-${{ matrix.level }}
86+
name: cucumber-report-accessibility-${{ matrix.level }}-${{ github.event_name == 'push' && 'home' || inputs.page || 'all' }}
7187
path: e2e/cucumber-report
7288
retention-days: 7
7389

7490
- name: Upload accessibility E2E logs
7591
if: ${{ !cancelled() }}
7692
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
7793
with:
78-
name: e2e-logs-accessibility-${{ matrix.level }}
94+
name: e2e-logs-accessibility-${{ matrix.level }}-${{ github.event_name == 'push' && 'home' || inputs.page || 'all' }}
7995
path: e2e/.logs/*.log
8096
include-hidden-files: true
8197
retention-days: 7

‎e2e/AGENTS.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Run commands from the repository root. Install dependencies and browsers once wi
99
- Existing initialized instance: `pnpm -C e2e e2e`
1010
- Standalone automated WCAG Level A scan: `pnpm -C e2e e2e:accessibility:a`
1111
- Standalone automated WCAG Level AA scan: `pnpm -C e2e e2e:accessibility:aa`
12+
- One-page automated WCAG scan: `pnpm -C e2e exec tsx ./scripts/run-cucumber.ts --full -- --tags "@wcag-a and @wcag-page-studio"` (replace the level and page tag as needed)
1213
- Reset, initialize, and run deterministic scenarios: `pnpm -C e2e e2e:full`
1314
- Prepare and run scenarios backed by shared fixtures: `E2E_START_AGENT_BACKEND=1 pnpm -C e2e e2e:prepared`
1415
- Tagged subset: `pnpm -C e2e e2e -- --tags @smoke`
@@ -38,7 +39,7 @@ An uninitialized instance is installed and authenticated lazily; an initialized
3839
## Tags And External Runtime
3940

4041
- Default scenarios use shared authenticated storage state. `@unauthenticated` creates a clean context; `@authenticated` is an intent and selection tag only.
41-
- `@axe` identifies standalone automated WCAG scans and is excluded from the default functional suite and normal CI commands. `@wcag-a` and `@wcag-aa` select the independent level-specific scans; the accessibility feature branch runs both as dedicated push jobs.
42+
- `@axe` identifies standalone automated WCAG scans and is excluded from the default functional suite and normal CI commands. `@wcag-a` and `@wcag-aa` select the independent level-specific scans. Page selectors use `@wcag-page-<slug>` and correspond to the folders under `features/accessibility/`. Pushes to the accessibility feature branch run only the Home page WCAG AA scan. Manual workflow runs accept a page choice and keep WCAG A and AA as separate jobs.
4243
- `@prepared` requires the prepared fixtures; the post-merge seed profile includes them.
4344
- `@external-model` and `@external-tool` identify scenarios that call real external runtimes. Deterministic commands exclude these tags; external commands are opt-in.
4445
- `@microphone` uses the checked-in fake audio fixture and an isolated Chromium context.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@accessibility @axe @wcag-a @wcag-page-agents @authenticated
2+
Feature: Agents page automated WCAG Level A check
3+
Axe checks only automatically detectable issues and does not establish WCAG conformance.
4+
5+
Scenario: Agents page has no automatically detectable WCAG Level A violations
6+
Given I am signed in as the default E2E admin
7+
When I open the "Agents" main page
8+
Then I should be on the "Agents" main page
9+
And the current page should have no automatically detectable WCAG Level A violations
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@accessibility @axe @wcag-aa @wcag-page-agents @authenticated
2+
Feature: Agents page automated WCAG Level AA check
3+
Axe checks only automatically detectable issues and does not establish WCAG conformance.
4+
5+
Scenario: Agents page has no automatically detectable WCAG Level AA violations
6+
Given I am signed in as the default E2E admin
7+
When I open the "Agents" main page
8+
Then I should be on the "Agents" main page
9+
And the current page should have no automatically detectable WCAG Level AA violations
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@accessibility @axe @wcag-a @wcag-page-home @authenticated
2+
Feature: Home page automated WCAG Level A check
3+
Axe checks only automatically detectable issues and does not establish WCAG conformance.
4+
5+
Scenario: Home page has no automatically detectable WCAG Level A violations
6+
Given I am signed in as the default E2E admin
7+
When I open the "Home" main page
8+
Then I should be on the "Home" main page
9+
And the current page should have no automatically detectable WCAG Level A violations
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@accessibility @axe @wcag-aa @wcag-page-home @authenticated
2+
Feature: Home page automated WCAG Level AA check
3+
Axe checks only automatically detectable issues and does not establish WCAG conformance.
4+
5+
Scenario: Home page has no automatically detectable WCAG Level AA violations
6+
Given I am signed in as the default E2E admin
7+
When I open the "Home" main page
8+
Then I should be on the "Home" main page
9+
And the current page should have no automatically detectable WCAG Level AA violations
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@accessibility @axe @wcag-a @wcag-page-integrations @authenticated
2+
Feature: Integrations page automated WCAG Level A check
3+
Axe checks only automatically detectable issues and does not establish WCAG conformance.
4+
5+
Scenario: Integrations page has no automatically detectable WCAG Level A violations
6+
Given I am signed in as the default E2E admin
7+
When I open the "Integrations" main page
8+
Then I should be on the "Integrations" main page
9+
And the current page should have no automatically detectable WCAG Level A violations
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@accessibility @axe @wcag-aa @wcag-page-integrations @authenticated
2+
Feature: Integrations page automated WCAG Level AA check
3+
Axe checks only automatically detectable issues and does not establish WCAG conformance.
4+
5+
Scenario: Integrations page has no automatically detectable WCAG Level AA violations
6+
Given I am signed in as the default E2E admin
7+
When I open the "Integrations" main page
8+
Then I should be on the "Integrations" main page
9+
And the current page should have no automatically detectable WCAG Level AA violations
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@accessibility @axe @wcag-a @wcag-page-knowledge @authenticated
2+
Feature: Knowledge page automated WCAG Level A check
3+
Axe checks only automatically detectable issues and does not establish WCAG conformance.
4+
5+
Scenario: Knowledge page has no automatically detectable WCAG Level A violations
6+
Given I am signed in as the default E2E admin
7+
When I open the "Knowledge" main page
8+
Then I should be on the "Knowledge" main page
9+
And the current page should have no automatically detectable WCAG Level A violations
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@accessibility @axe @wcag-aa @wcag-page-knowledge @authenticated
2+
Feature: Knowledge page automated WCAG Level AA check
3+
Axe checks only automatically detectable issues and does not establish WCAG conformance.
4+
5+
Scenario: Knowledge page has no automatically detectable WCAG Level AA violations
6+
Given I am signed in as the default E2E admin
7+
When I open the "Knowledge" main page
8+
Then I should be on the "Knowledge" main page
9+
And the current page should have no automatically detectable WCAG Level AA violations

0 commit comments

Comments
 (0)