Conversation
Review Summary by QodoAdd ADR-001 component architecture and implement accessibility testing infrastructure
WalkthroughsDescription• Add ADR-001 documenting component architecture decisions (shadow DOM, CSS API, cascade layers, form participation, testing, slots, accessibility) • Implement accessibility test infrastructure with vitest-axe and jsdom environment support • Add three new *.a11y.spec.ts files running axe-core audits for button, focus-ring, and ripple components • Wrap all component CSS in @layer components to enforce cascade layer positioning per ADR • Refactor test utilities with createElement() content parameter, flush() alias, and polyfillAnimate() helper • Update existing component specs to use shared test harness and new waitForHydration() helper Diagramflowchart LR
ADR["ADR-001<br/>Architecture Decisions"]
CSS["Component CSS<br/>@layer components"]
TestUtils["Test Utilities<br/>createElement, flush, polyfillAnimate"]
A11yTests["Accessibility Tests<br/>vitest-axe + jsdom"]
ComponentSpecs["Component Specs<br/>Refactored to use harness"]
ADR --> CSS
ADR --> TestUtils
TestUtils --> A11yTests
TestUtils --> ComponentSpecs
A11yTests --> Button["button.a11y.spec.ts"]
A11yTests --> FocusRing["focus-ring.a11y.spec.ts"]
A11yTests --> Ripple["ripple.a11y.spec.ts"]
File Changes1. docs/adr/001-component-architecture.md
|
Code Review by Qodo
1. JUnit report committed
|
…cture-Decisions_Matthew-Van-Dusen
Summary
ADR document:New Architecture decision record covering (shadow DOM, CSS API, cascade layers, form participation, testing, slots, accessibility baseline) plus non-goals, consequences, and open questions.Test infrastructure:Added flush() alias and content parameter to createElement() in test-utils. Added setup.ts for vitest-axe matcher registration. Added vitest-axe dependency. Updated vitest config with setup file.Accessibility specs:Three new *.a11y.spec.ts files running axe-core audits under jsdom for button (7 tests), focus-ring (1 test), andripple (1 test).
Component CSS:All three component stylesheets updated to follow the class-scoped selector guardrails documented in the ADR (no bare tag selectors except host display).Spec updates: Existing specs updated to use the shared harness's createElement with its new content parameter signature.Changes
Notes