**Overview & approach**I’d prototype a progressive-enhanced date-picker: native <input type="date"> on mobile and modern browsers; a custom calendar popup for desktop with full keyboard support, ARIA semantics, and robust validation. Iterative testing with keyboard-only, screen readers, and real users.**Implementation plan (high level)**- HTML: visually-hidden label, text input (type="text") with aria-haspopup="dialog" and aria-expanded, and a calendar button.- Calendar: role="dialog" containing a grid role="grid" and each day role="gridcell" with aria-selected.- JS: open/close popup, build month grid, keyboard handlers, focus trapping, input parsing/formatting, and fallbacks.- CSS: responsive grid, reduced-motion option, touch targets >= 44px.Example snippets:html
<input id="date-input" aria-haspopup="dialog" aria-expanded="false" />
<button id="open-cal" aria-label="Choose date">📅</button>
<div id="cal" role="dialog" aria-modal="true" hidden>...</div>
js
// keyboard: ArrowLeft/Right change day, ArrowUp/Down week, Enter selects, Esc closes
input.addEventListener('keydown', handleKey);
**Key accessibility & focus rules**- Move focus into calendar on open; focus first selected or today.- Trap focus inside dialog; restore focus to opener on close.- Use aria-live to announce month changes and invalid input messages.- Provide visible focus ring and high-contrast states.**Validation & mobile fallback**- Parse freeform input with Intl.DateTimeFormat patterns; show inline error with aria-invalid="true" and descriptive aria-describedby.- On touch devices, prefer native <input type="date">; detect support via feature test.**Test cases & accessibility checks**- Keyboard-only: open, navigate days, select, close, focus restore.- Screen reader: NVDA/JAWS/VoiceOver announces dialog, grid, selected date, errors.- Edge cases: leap years, month rollovers, min/max date, invalid strings.- Mobile: native picker fallback, formatting consistency.- Automated checks: Axe, WAVE; manual: tab order, focus trap, color contrast, touch target size.- Usability: time-to-complete with keyboard vs mouse; error recovery tasks.**Outcome & metrics**- Success metrics: completion rate, error rate on date entry, time to select, accessibility violations zero in automated scan, positive qualitative feedback from users with disabilities.