On this page

Sheet

Keys, what Sheet gives you and what your team does.

Conformance

Sheet meets WCAG 2.2 level AA when used as described on these pages. It follows the Dialog (Modal) pattern of the WAI-ARIA Authoring Practices.

Keyboard

Key Action
Tab Moves to the next control in the sheet. From the last one, goes back to the first.
Shift + Tab Moves to the previous control in the sheet.
Esc Closes the sheet. Focus goes back to the button that opened it.

What Sheet gives you

  • role="dialog" and aria-modal="true", named by SheetTitle and described by SheetDescription.
  • Focus moves into the sheet when it opens, stays inside while it is open, and goes back to the trigger when it closes.
  • The page behind is hidden from screen readers and can’t be scrolled.
  • A close button with a name (closeLabel), reachable by keyboard.

What your team does

  • Always give the sheet a SheetTitle. If the design has no visible title, keep it with class="sr-only".
  • Set closeLabel in the page’s language.
  • Open a sheet only when people ask for it, never on page load.
  • Put the primary action last in the footer (D10), so the reading order matches the visual order.

WCAG criteria

Criterion Level How
1.3.1 Info and Relationships A Title and description linked to the dialog
2.1.1 Keyboard A Every part works with the keyboard; Esc closes
2.1.2 No Keyboard Trap A Esc and the close button always leave the sheet
2.4.3 Focus Order A Focus moves in on open and back to the trigger on close
4.1.2 Name, Role, Value A role="dialog", aria-modal, named by the title