Skip to content
easeweb
Search topics

Date pickers that can't be typed in or used by keyboard

A delivery date field is read-only and opens a calendar of plain divs, so a keyboard can't enter a date and a screen reader hears only bare numbers.

WCAG 2.2
SC 2.1.1ASC 4.1.2A
Required by
Section 508 · EN 301 549 (EU)
Broken <input id="delivery" type="text" readonly>
The accessibility problem illustrated: Motor:How do I enter the date?
01

The problem

Keyboard users can't enter a delivery date at all, and screen reader users hear bare numbers with no chosen day and no today

02

Try it

Set the delivery date to Thursday 12 November with the keyboard alone

Tab to Delivery date and type, or press Enter or the down arrow: nothing goes in and nothing opens. Click the field to open the calendar and point at a day: the panel shows what a screen reader reading under the mouse says. Then apply a fix: type the date, or in the dialog fix, Tab to the calendar button, press Enter, and move with the arrow keys, Page Up and Page Down.

Broken Can you fix this?

BrokenA read-only field and a calendar only a click opens

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Let the date be typed, and any calendar be used by keyboard

Before
BrokenA read-only field and a calendar only a click opens
<label for="delivery">Delivery date</label><input id="delivery" name="delivery" type="text" readonly placeholder="Choose a date"><div class="calendar" hidden>  <div class="cal-head">    <span class="prev">‹</span>    <span class="cal-month">November 2026</span>    <span class="next">›</span>  </div>  <div class="cal-week">    <span>Su</span>    <span>Mo</span>    <span>Tu</span>    <span>We</span>    <span>Th</span>    <span>Fr</span>    <span>Sa</span>  </div>  <div class="cal-days"></div></div>
What is wrong4 points
  • A date can't be typed: the field has readonly, so it takes focus but refuses typing.
  • The calendar can't be opened from the keyboard: it opens only on a click, which no key fires on the field.
  • A keyboard can't set a date at all: the days are divs no key can reach.
  • A screen reader reads only numbers, with nothing to say which day is chosen or which is today: the days have no role, and the chosen day and today are only the selected and today classes.
After

A native date input

<label for="delivery">Delivery date</label><input id="delivery" name="delivery" type="date">
How it is fixed2 steps
  1. Give the field type="date". The browser lets people type each part of the date in turn, gives them its own calendar to pick from, and tells a screen reader the field's name and role and the date in it. It takes the order of the parts from its own language settings and, in most desktop browsers, shows it in the empty field, such as dd/mm/yyyy, so the format is stated without any words of yours, and the value sent is always 2026-11-12, whatever the order on screen. On a phone, a tap opens the system's own date picker.
  2. Remove the calendar, its script and its styles: there is no calendar left to maintain.

This fixes the Before and passes 2.1.1 and 4.1.2, as far as each browser's own control does. Of the extras teams keep a custom calendar for, the native input does none: its calendar can't be styled, and it can limit the range with min and max but can't shut out single days, such as Sundays or a sold-out day, so those have to be refused after the date is chosen. Browser and screen reader pairs read its parts differently, so test the ones you support. The order follows the browser, not the page, so a Japanese page in a browser set to US English shows month first; don't write a format of your own beside a native date field, since it may not match.

Why this fix: Use native HTML first

04

Verify the fix

5 checks, no mouse.

Test with: Keyboard, Screen reader, Zoom, Forced colors

0 of 5 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the shared date field or calendar component changes.

How screen readers handle aria-describedby, aria-current="page" and <dialog>

Limits

This is a starting pattern for a single date. It doesn't cover choosing a range, such as check-in and check-out dates, time zones, or calendars other than the Gregorian one, such as Japanese era years. The snippets leave out checking the date against the days the shop delivers. Test the complete journey, with your real dates, in the browsers and assistive technology you support, on a phone as well as a desktop.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service