Skip to content

Conversation

@rockdev055
Copy link

Adds a small, standards-aligned fare calculator using vanilla TypeScript + Vite. Replaces CSS with SCSS structured per Sass standards. Includes unit tests (Vitest) and E2E + accessibility checks (Playwright + axe-core).

What changed

Semantic form UI (labels, fieldset/legend, aria-live output, skip link)

TS logic: load fares.json, purchase availability gating, 10-trip "Anytime" packs

SCSS modules: settings → tools → elements → components; tokens/mixins; use sass:map (map.get)

Autoprefixer via postcss.config.js

Vitest unit tests for computeTotal

Playwright E2E + axe-core a11y scan; webServer auto-starts Vite

vitest.config.ts to exclude e2e/**; updated scripts; README with run/build/test steps

Why
Keep footprint tiny while meeting accessibility, semantics, and performance goals. No framework overhead; easy to embed and test.

How to run

Dev: npm i && npm run dev

Unit tests: npm run test

E2E + a11y: npx playwright install --with-deps then npm run test:e2e

Build/preview: npm run build && npm run preview

Accessibility

Keyboard-only flow verified; visible :focus-visible

Output updates announced via aria-live

Axe scan fails on serious/critical violations

…TS + Vite; SCSS per standards; unit & e2e/axe tests; config fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant