Accessibility
What's built in
Drawers receive
role="dialog"(modal) orrole="region"(passive) witharia-modal="true"The first heading inside the drawer is linked via
aria-labelledbyA live region announces "Dialog opened" / "Dialog closed" (or "Notification" for passive drawers) to screen readers
Focus moves to the first focusable element inside the drawer on open — passive drawers skip focus management
Tab and Shift+Tab are trapped within the drawer to prevent focus from escaping behind the overlay
Focus returns to the trigger element when the drawer is dismissed
All drawer content is hidden from screen readers when
data-stateisclosedOverlays are marked
aria-hidden="true"— they are decorativeDrag handles receive a descriptive
aria-labelSnap navigation buttons (
data-snap-to) getaria-disabled="true"when there's no further snap point in that direction, so the dead end is announced rather than silently doing nothing — see Core Behavior — Snap navigation buttons
Passive mode differences
Passive drawers use role="region" instead of role="dialog" and do not trap focus or lock body scroll, since they are non-modal notifications. See Core Behavior — Passive mode for more detail.