• Success Criterion 2.1.1
  • Conformance level A

Control That Requires Precisely Timed Key Presses

2.1.1 — Keyboard

Scenario

Setting

A university's online course catalog

What’s wrong

Keyboard operable only with specific timing (hold, rapid double-press).

Example

let pressStart;
card.addEventListener('keydown', (e) => {
  if (e.key === 'Enter' && !pressStart) pressStart = Date.now();
});
card.addEventListener('keyup', (e) => {
  if (e.key === 'Enter' && Date.now() - pressStart > 2000) addToSchedule();
  pressStart = null;
});

Why it matters

A student who cannot hold a key steady for exactly two seconds, or whose assistive input repeats keys automatically, can never add the course.

How to test

Tab to the control and try a normal single key press: if it only responds to a held key or rapid double-press, it fails.

How to fix

Drop the timing requirement entirely; if a hold-to-confirm pattern is wanted for safety, pair it with a plain single-press confirmation dialog.

card.addEventListener('keydown', (e) => {
  if (e.key === 'Enter') addToSchedule();
});

Outcome

A student presses Enter a single time and the course drops straight into their schedule.

Who is affected

Users with motor or tremor conditions, and switch-access users whose devices send brief discrete presses, cannot meet the timing requirement.

Learn more