diff --git a/septa-fare-calculator/.gitignore b/septa-fare-calculator/.gitignore new file mode 100644 index 000000000..a200de137 --- /dev/null +++ b/septa-fare-calculator/.gitignore @@ -0,0 +1,2 @@ +.node_modules +.vscode \ No newline at end of file diff --git a/septa-fare-calculator/.stylelintrc.json b/septa-fare-calculator/.stylelintrc.json new file mode 100644 index 000000000..5e6abf148 --- /dev/null +++ b/septa-fare-calculator/.stylelintrc.json @@ -0,0 +1,10 @@ +{ + "extends": [ + "stylelint-config-standard-scss" + ], + "rules": { + "selector-max-id": 0, + "max-nesting-depth": 3, + "string-quotes": "double" + } +} \ No newline at end of file diff --git a/septa-fare-calculator/e2e/a11y.spec.ts b/septa-fare-calculator/e2e/a11y.spec.ts new file mode 100644 index 000000000..19120075d --- /dev/null +++ b/septa-fare-calculator/e2e/a11y.spec.ts @@ -0,0 +1,19 @@ +import { test, expect } from '@playwright/test'; +import AxeBuilder from '@axe-core/playwright'; + +test('keyboard flow and total updates', async ({ page }) => { + await page.goto('/'); + await page.getByRole('combobox', { name: 'Where are you going?' }).selectOption({ index: 0 }); + await page.getByRole('combobox', { name: 'When are you riding?' }).selectOption('weekday'); + await page.getByLabel('Station Kiosk').check(); + await page.getByLabel('How many rides will you need?').fill('3'); + const total = await page.getByRole('status'); + await expect(total).toContainText('$'); +}); + +test('axe scan passes (no serious violations)', async ({ page }) => { + await page.goto('/'); + const accessibilityScanResults = await new AxeBuilder({ page }).analyze(); + const serious = accessibilityScanResults.violations.filter(v => v.impact === 'serious' || v.impact === 'critical'); + expect(serious).toEqual([]); +}); diff --git a/septa-fare-calculator/img/widget.png b/septa-fare-calculator/img/widget.png deleted file mode 100644 index 141f1d952..000000000 Binary files a/septa-fare-calculator/img/widget.png and /dev/null differ diff --git a/septa-fare-calculator/img/zone-map.jpg b/septa-fare-calculator/img/zone-map.jpg deleted file mode 100644 index 3aa094802..000000000 Binary files a/septa-fare-calculator/img/zone-map.jpg and /dev/null differ diff --git a/septa-fare-calculator/index.html b/septa-fare-calculator/index.html index ba1a762c9..09d03ca29 100644 --- a/septa-fare-calculator/index.html +++ b/septa-fare-calculator/index.html @@ -1,10 +1,63 @@ - + -
- -