Month, week, and day views accessible via keyboard navigation
Why it matters
Calendar slots that are not reachable via Tab or Arrow keys exclude keyboard-only users and screen reader users entirely — the latter navigate by virtual cursor through focusable elements. This violates WCAG 2.2 SC 2.1.1 (Keyboard) and SC 2.4.7 (Focus Visible), and Section 508 2018 Refresh 502.3. Div-based slot grids without tabIndex or role attributes are the most common cause: they look interactive but are invisible to keyboard navigation. A user with motor impairment who cannot use a mouse literally cannot book an appointment.
Severity rationale
Low because the failure locks out keyboard-only users but does not compromise data integrity — however it violates WCAG 2.2 SC 2.1.1 and Section 508 and constitutes an ADA compliance gap.
Remediation
Use native <button> elements for all calendar slots. Add onKeyDown handlers for Arrow key navigation and ensure visible focus styles are applied via focus-visible utilities.
// src/components/CalendarSlot.tsx
export function CalendarSlot({ status, time, onSelect }) {
function handleKeyDown(e: React.KeyboardEvent) {
if ((e.key === 'Enter' || e.key === ' ') && status === 'available') {
e.preventDefault()
onSelect(time)
}
}
return (
<button
type="button"
tabIndex={0}
onKeyDown={handleKeyDown}
onClick={() => status === 'available' && onSelect(time)}
aria-label={`${status} slot at ${time}`}
className="focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
>
{time}
</button>
)
}
Verify by tabbing through the calendar without a mouse: every slot must receive focus, show a visible focus ring, and respond to Enter/Space.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Calendar & Availability Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- wcag:2.2 · 2.1.1 — Keyboard — all calendar functionality operable via keyboard
- wcag:2.2 · 2.4.7 — Focus Visible — keyboard focus indicator must be visible on slots
- section-508:2018-refresh · 502.3 — Accessibility Services — interactive elements must expose keyboard operability
Taxons
History
- 2026-04-18·v1.0.0·Initial import from booking-calendar-availability·automated