veza/apps/web/src/utils
senke 49a1e9a5c0 aesthetic-improvements: add automated contrast testing for WCAG compliance
- Created contrast utility (apps/web/src/utils/contrast.ts)
  - getRelativeLuminance() - calculates WCAG relative luminance
  - getContrastRatio() - calculates contrast ratio between colors
  - meetsWCAGAA() / meetsWCAGAAA() - validates WCAG standards
  - parseRGB() - parses RGB strings from CSS variables
- Created contrast test suite (apps/web/src/__tests__/contrast.test.ts)
  - Tests all design system color combinations
  - Validates primary text (white) on all backgrounds
  - Validates secondary text (dim) on all backgrounds
  - Validates text with opacity variants
  - All combinations must meet WCAG AA (4.5:1)
- Added contrast test step to CI workflow
- Prevents contrast ratio regressions
- Action 11.1.1.5 complete
2026-01-16 10:26:20 +01:00
..
apiErrorHandler.test.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
apiErrorHandler.ts security: remove dev-only check for request ID in error messages 2026-01-15 19:50:41 +01:00
apiToastHelper.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
apiToastHelper.ts state-ownership: delete unused optimisticStoreUpdates.ts file 2026-01-15 19:26:53 +01:00
broadcastSync.ts state-ownership: extend broadcastSync to invalidate React Query cache 2026-01-15 19:25:13 +01:00
contrast.ts aesthetic-improvements: add automated contrast testing for WCAG compliance 2026-01-16 10:26:20 +01:00
csp.ts stabilizing apps/web: FIRST BATCH 2025-12-17 08:07:35 -05:00
date.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
date.ts refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
errorMessages.test.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
errorMessages.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
firstTime.ts cognitive-load: add first-time user detection utility 2026-01-16 02:33:46 +01:00
format.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
format.ts refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
formValidation.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
idNormalization.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
idNormalization.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
logger.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
logger.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
networkErrorTracker.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
offlineDetection.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
optimisticUpdates.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
queryClientSingleton.ts state-utilities: update stateInvalidation to work with React Query 2026-01-15 19:38:47 +01:00
reactQuerySync.ts data-flow: handle broadcastSync message conflicts with React Query sync 2026-01-15 17:58:49 +01:00
reportIssue.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
sanitize.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
sanitize.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
serviceErrorHandler.test.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
serviceErrorHandler.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
stateHydration.ts state-ownership: consolidate chat stores to feature store 2026-01-15 19:31:40 +01:00
stateInvalidation.ts state-utilities: fix TypeScript error in stateInvalidation 2026-01-15 19:39:19 +01:00
storeSelectors.ts state-ownership: consolidate chat stores to feature store 2026-01-15 19:31:40 +01:00
storeSelectors.ts.backup state-ownership: delete unused optimisticStoreUpdates.ts file 2026-01-15 19:26:53 +01:00
timeoutHandler.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
timeoutHandler.ts state-ownership: delete unused optimisticStoreUpdates.ts file 2026-01-15 19:26:53 +01:00
toast.ts state-ownership: delete unused optimisticStoreUpdates.ts file 2026-01-15 19:26:53 +01:00
typeGuards.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
typeGuards.ts api-contracts: replace ApiError interface with Zod-inferred type 2026-01-15 17:03:35 +01:00
url.test.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00
url.ts refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
validation.test.ts refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
validation.ts incus deployement fully implemented, Makefile updated and make fmt ran 2026-01-13 19:47:57 +01:00