How to build an accessible ActionSheet in React

Renders role="menu" with role="menuitem" buttons under vertical roving focus (Arrow keys, Home/End, wrapping). The title labels the menu via aria-labelledby (or a built-in label otherwise) and the description via aria-describedby. FocusScope traps and restores focus; DismissableLayer handles Escape and outside-pointer dismissal; a separate Cancel button provides an explicit non-destructive exit.

When to use a ActionSheet

When not to use it

Keyboard interactions

Role menu, verified at WCAG 2.2-AA.

Common mistakes

Avoid: <ActionSheet actions={[{ label: "OK", onSelect }]} />

Prefer: <AlertDialog title="Delete item?" />

A one-action sheet is a confirmation; AlertDialog states the decision clearly

Example

<ActionSheet
  open={isOpen}
  onOpenChange={setIsOpen}
  title="Share photo"
  actions={[
    { label: 'Copy link', onSelect: copyLink },
    { label: 'Delete', onSelect: remove, destructive: true },
  ]}
/>

See the full ActionSheet reference →