Accessibility fixes and form session expiration fix

- Fix color contrast: change #179e83 to #148069 for WCAG AA compliance
- Add ARIA attributes to mobile nav toggle (aria-expanded, aria-controls)
- Implement focus trap on mobile menu with Escape key support
- Add aria-hidden to decorative hero SVG
- Add ARIA validation to contact form (aria-invalid, aria-describedby)
- Fix touch target sizes (notification close button 48x48px)
- Fix form session expiration by relaxing timestamp validation
- Add cache busting (v1.1.0) to JS/CSS files
- Update service worker cache version to force refresh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
root
2026-01-12 20:22:49 +00:00
parent 5e1401ef14
commit f495ee23c2
8 changed files with 3552 additions and 3383 deletions

8
sw.js
View File

@@ -1,10 +1,10 @@
// UK Data Services - Service Worker for PWA Functionality
// Version 1.0 - Advanced caching and offline support
const CACHE_NAME = 'ukds-pwa-v1.0.0';
const STATIC_CACHE = 'ukds-static-v1.0.0';
const DYNAMIC_CACHE = 'ukds-dynamic-v1.0.0';
const IMAGE_CACHE = 'ukds-images-v1.0.0';
const CACHE_NAME = 'ukds-pwa-v1.1.0';
const STATIC_CACHE = 'ukds-static-v1.1.0';
const DYNAMIC_CACHE = 'ukds-dynamic-v1.1.0';
const IMAGE_CACHE = 'ukds-images-v1.1.0';
// Files to cache immediately (critical resources)
const STATIC_ASSETS = [