Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8ff96f0
chore: linting and unit tests added (#8)
userjoergjakoby Mar 31, 2025
7a710b3
build(deps-dev): bump @playwright/test from 1.42.1 to 1.49.1 (#14)
dependabot[bot] Mar 31, 2025
5944f2c
chore(dependabot): group updates
Th3S4mur41 Mar 31, 2025
1808b26
build(deps-dev): bump the typescript-eslint group with 2 updates (#32)
dependabot[bot] Mar 31, 2025
57a4511
build(deps-dev): bump the typescript-eslint group with 2 updates (#34)
dependabot[bot] Mar 31, 2025
317464d
build(deps): bump koa from 2.16.0 to 2.16.1 (#38)
dependabot[bot] Apr 9, 2025
c3fa789
build(deps-dev): bump playwright-chromium from 1.47.2 to 1.51.1 (#35)
dependabot[bot] Apr 9, 2025
02b6e91
build(deps-dev): bump the typescript-eslint group with 2 updates (#39)
dependabot[bot] Apr 9, 2025
b5bfece
ci: remove auto-merge workflow for Dependabot PRs
Th3S4mur41 Apr 28, 2025
6f84e00
build(deps-dev): bump http-proxy-middleware from 2.0.6 to 2.0.9 (#42)
dependabot[bot] Apr 28, 2025
061ce9d
build(deps): bump tar-fs from 3.0.6 to 3.0.9 (#44)
dependabot[bot] Jun 3, 2025
8776c07
build(deps): bump tar-fs from 3.0.9 to 3.1.1 (#57)
dependabot[bot] Sep 24, 2025
f114de3
build(deps-dev): bump brace-expansion from 1.1.11 to 1.1.12 (#58)
dependabot[bot] Sep 24, 2025
d673e95
build(deps): bump glob from 10.3.3 to 10.5.0 (#66)
dependabot[bot] Nov 19, 2025
d20e434
build(deps-dev): bump js-yaml from 3.14.1 to 3.14.2 (#67)
dependabot[bot] Nov 19, 2025
0ef4124
build(deps-dev): bump node-forge from 1.3.1 to 1.3.2 (#70)
dependabot[bot] Nov 27, 2025
c261a3c
ci: update action references from eviden-actions to atos-actions
Th3S4mur41 Dec 11, 2025
67f341c
feat: add cypress
userjoergjakoby Jan 5, 2026
852c64c
chore: update packages and scss fix
userjoergjakoby Jan 28, 2026
49a9e57
chore: minor changes
userjoergjakoby Jan 30, 2026
41eb112
chore: update package-lock.json
userjoergjakoby Feb 3, 2026
032acfb
fix: unit tests
userjoergjakoby Feb 3, 2026
658dddf
chore: run cypress tests
userjoergjakoby Feb 3, 2026
1957f15
chore: show playwright report removed
userjoergjakoby Feb 3, 2026
f92952c
chore: start-server-and-test added to run cypress tests
userjoergjakoby Feb 3, 2026
db13bfa
chore: use electron as browser for cypress tests
userjoergjakoby Feb 3, 2026
a252656
chore: minor improvement
userjoergjakoby Feb 3, 2026
d178011
chore: clean up step added
userjoergjakoby Feb 3, 2026
4d7961c
chore: clean up step added
userjoergjakoby Feb 4, 2026
70a738a
chore: clean up step added
userjoergjakoby Feb 4, 2026
3ab8729
chore: remove unused code and clean up configuration files
userjoergjakoby Feb 4, 2026
b09ba7a
chore: remove commented-out assertion for accessibility violations
userjoergjakoby Feb 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,23 @@ updates:
interval: 'daily'
time: '00:00'
timezone: 'Europe/Berlin'
groups:
typescript-eslint:
patterns:
- '@typescript-eslint/*'
angular:
patterns:
- '@angular/*'
- '@angular-devkit/*'
exclude-patterns:
- '@angular/cli'
angular-eslint:
patterns:
- '@angular-eslint/*'

- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
time: '00:00'
timezone: 'Europe/Berlin'
timezone: 'Europe/Berlin'
19 changes: 16 additions & 3 deletions .github/workflows/a11y-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}

- id: get_playwright_version
uses: eviden-actions/get-playwright-version@v1
uses: atos-actions/get-playwright-version@v1

a11y-checks:
name: '🛠️ Test Code'
Expand All @@ -46,6 +46,13 @@ jobs:
check-latest: true
cache: 'npm'

- name: '🧼 Clean up'
run: |
rm -rf node_modules
rm -rf playwright-report
rm -rf results
rm -rf test-results

- name: '⛓️ Install dependencies'
run: npm ci --no-audit --prefer-offline --progress=false

Expand All @@ -58,11 +65,17 @@ jobs:
- name: '🧫 Run Unit tests'
run: npm run test

- name: '🧫 Run a11y tests'
- name: '🧫 Run Playwright a11y tests'
run: npm run test:a11y

- name: '🧫 Run Cypress A11y checks'
run: npm run test:cypress

- name: '📤 Upload test results'
uses: actions/upload-artifact@v4 # TODO: Replace with eviden-actions/upload-artifact when urn-id is supported in download-artifact
with:
name: test-results
path: playwright-report
path: |
playwright-report
results
test-results
51 changes: 0 additions & 51 deletions .github/workflows/auto-merge.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ Thumbs.db
/playwright-report/
/blob-report/
/playwright/.cache/
/results/
123 changes: 123 additions & 0 deletions ACCESSIBILITY_TESTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Accessibility Testing Configuration

## Übersicht

Dieses Projekt verwendet IBM Equal Access Accessibility Checker für automatisierte Accessibility-Tests in Playwright und Cypress.

## Konfigurationsdateien

### 1. `.achecker.yml`
Diese Datei wird **nur vom CLI-Tool** (`npx achecker`) verwendet und **nicht** von der Node.js API.

```bash
# CLI-Verwendung (lädt .achecker.yml automatisch)
npx achecker http://localhost:4201
```

### 2. `aceconfig.js`
Diese Datei enthält die Konfiguration für die **Node.js API** und wird in den Playwright- und Cypress-Tests verwendet.

```javascript
module.exports = {
ignore: ['style_highcontrast_visible', 'style_color_misuse', 'text_block_heading']
// ... weitere Konfiguration
};
```

## Ignorieren von Regeln

### Warum manuelle Filterung notwendig ist

Die IBM accessibility-checker Bibliothek lädt `.achecker.yml` **nicht automatisch**, wenn Sie die Node.js API verwenden (`require('accessibility-checker')`). Außerdem ignoriert `aChecker.getCompliance()` die `ignore`-Regeln aus der Konfiguration nicht automatisch.

### Implementierung in den Tests

#### Playwright Tests (`tests/shared-tests.ts`)
```typescript
const aceConfig = require(path.resolve(__dirname, '..', 'aceconfig.js'));

// Nach dem Scan: Markiere ignorierte Regeln
if (report?.results && aceConfig.ignore) {
report.results = report.results.map((result: any) => {
if (aceConfig.ignore.includes(result.ruleId)) {
return { ...result, ignored: true };
}
return result;
});
}

// Zähle nur nicht-ignorierte Failures
const failLevels = ['violation', 'potentialviolation'];
const failures = reportResults.filter(
(r: any) => !r.ignored && failLevels.includes(r.level)
);
```

#### Cypress Tests (`cypress.config.js`)
```javascript
const aceConfig = require(path.resolve(__dirname, 'aceconfig.js'));

// Im equalAccessGetCompliance Task
if (report?.results && aceConfig.ignore) {
report.results = report.results.map((result) => {
if (aceConfig.ignore.includes(result.ruleId)) {
return { ...result, ignored: true };
}
return result;
});
}

// Berechne reportCode basierend auf nicht-ignorierten Failures
const failLevels = ['violation', 'potentialviolation'];
const failures = reportResults.filter(
(r) => !r.ignored && failLevels.includes(r.level)
);
const reportCode = failures.length > 0 ? 2 : 0;
```

## Aktuell ignorierte Regeln

Die folgenden Regeln werden in den Tests ignoriert:

1. **style_highcontrast_visible** - Manueller Test erforderlich für Windows High Contrast Mode
2. **style_color_misuse** - Potentielle Verletzung bzgl. Farbverwendung
3. **text_block_heading** - Potentielle Verletzung bei Preisangaben, die fälschlicherweise als Überschriften erkannt werden

## Tests ausführen

```bash
# Playwright Accessibility Tests
npm run test:a11y

# Cypress E2E Accessibility Tests
npm run cypress:run:e2e

# Alle Tests
npm test
```

## Neue Regeln ignorieren

1. Füge die Regel zu `aceconfig.js` im `ignore` Array hinzu
2. Füge die Regel zu `.achecker.yml` im `ignore` Array hinzu (für CLI-Verwendung)
3. Die Tests werden die Regel automatisch ignorieren

Beispiel:
```javascript
// aceconfig.js
ignore: [
'style_highcontrast_visible',
'style_color_misuse',
'text_block_heading',
'neue_regel_hier' // Neue Regel hinzufügen
]
```

```yaml
# .achecker.yml
ignore:
- style_highcontrast_visible
- style_color_misuse
- text_block_heading
- neue_regel_hier # Neue Regel hinzufügen
```
23 changes: 23 additions & 0 deletions aceconfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const path = require('path');
const os = require('os');

module.exports = {
ruleArchive: 'latest',
policies: ['IBM_Accessibility', 'WCAG_2_2'],
failLevels: ['violation'],
reportLevels: [
'violation',
'potentialviolation',
'recommendation',
'potentialrecommendation',
'manual'
],
outputFormat: ['html', 'json'],
outputFilenameTimestamp: true,
label: [process.env.TRAVIS_BRANCH || 'local-scan'],
outputFolder: path.resolve(__dirname, 'results'),
baselineFolder: path.resolve(__dirname, 'test', 'baselines'),
cacheFolder: path.join(os.tmpdir(), 'accessibility-checker'),
puppeteerArgs: ['--no-sandbox', '--disable-setuid-sandbox'],
ignoreRules: ['style_highcontrast_visible', 'style_color_misuse', 'text_block_heading', 'potential_heading'] // works only with empty failLevels []
};
6 changes: 3 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "accessibilityApp:build:production"
"buildTarget": "accessibilityApp:build:production"
},
"development": {
"browserTarget": "accessibilityApp:build:development"
"buildTarget": "accessibilityApp:build:development"
}
},
"defaultConfiguration": "development",
Expand All @@ -79,7 +79,7 @@
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "accessibilityApp:build"
"buildTarget": "accessibilityApp:build"
}
},
"test": {
Expand Down
Loading
Loading