On this page

Range calendar

Keys, what Range calendar gives you and what your team does.

Conformance

Range calendar meets WCAG 2.2 level AA when used as described on these pages. It uses the same grid of days as Calendar.

Keyboard

Key Action
Tab Moves focus to the previous and next buttons, then into the grid.
← → Moves one day.
↑ ↓ Moves one week.
Page Up Page Down Moves one month. With Shift, one year.
Home End Moves to the first or last day of the week.
Enter Space Picks the start, then the end.

What Range calendar gives you

  • The calendar is named by the month it shows, with a hidden level-2 heading of the same text.
  • The days are a table with weekday column headers. Every cell in the range has aria-selected.
  • Each day is a button named by its full date, with aria-disabled when it can’t be picked.
  • The range shows with a fill and a bar, and its ends with the primary fill, so it does not depend on colour alone (WCAG 1.4.1).
  • A visible focus ring on the focused day (color.border.focus, 2 px, 2 px away), above the band.

What your team does

  • Give the picker a visible label and show the picked range as text, so it can be read without the grid.
  • Pass the page language to locale.
  • Say on the page why some days can’t be picked, and any limit on the length.

WCAG criteria

Criterion Level How
1.3.1 Info and Relationships A Grid, column headers, full date per day, aria-selected across the range
1.4.1 Use of Color A Bar under the range; struck-through unavailable days
1.4.11 Non-text Contrast AA The bar, color.border.selected, is 3:1 on background.selected (D24)
2.1.1 Keyboard A Arrow keys, Page Up, Page Down, Home, End
2.4.7 Focus Visible AA Focus ring on the focused day
4.1.2 Name, Role, Value A Day buttons named by their date; aria-selected, aria-disabled