Docs

Main site

Installation Browser support Extend config MCP server
Validation Page speed testing Responsive design
Accordion Aspect Ratio Avatar Badge Banner Bento Grid Blockquote Breadcrumbs Button Callout Card Drawer Dropdown Link Modal Navbar Navblock Pagination Popover Progress Separator Tabs Timeline Toast Tooltip
Checkbox Datepicker File upload Form field Input Label OTP Radio Range Select Textarea Toggle
Header Footer
Accordion Auth Checkbox & Radio Content Drawers Features Modals Statistics & Metrics Teams
Address Contact number Currency symbol Date Emirates ID Name
Close
Home Documentation Components Drawer

Drawer

A Drawer is a panel that slides in from an edge of the viewport to surface secondary content — filters, navigation, settings, or a detail view — without leaving the current page. "aegov-drawer" traps focus, locks body scroll, and returns focus to whatever opened it once closed.

Overlay
Status
Active
Introduced
4.0.x
View source code

Anatomy

aegov-drawer renders a panel anchored to one edge of the viewport, with an optional dimming backdrop behind it. It stays where you declare it — moving out of an ancestor only while open, and only if that ancestor would trap it (see is-portal) — takes its stacking order from a shared overlay manager, traps focus inside while open, and locks body scroll.

Image showing anatomy of a drawer

Item Name Description
1 Backdrop The dimming overlay behind the panel (is-overlay)
2 Panel The dialog surface itself — position, size, and pinning apply here
3 Content Your own slotted markup — heading, body, and action area
4 Trigger The element (usually a button) whose click calls show() — not part of the component itself

Position

position selects which edge the drawer slides from. right is the default and works well for filters and detail panels; left suits primary navigation; top and bottom suit transient toolbars or mobile action sheets.

Right Left Top Bottom

Right-side drawer

Slides in from the right — best for filters and detail panels.

Left-side drawer

Slides in from the left — best for primary navigation.

Top drawer

Drops in from the top — useful for transient toolbars and announcements.

Bottom drawer

Slides in from the bottom — common on mobile for action sheets.

<aegov-button field-id="pos-right-btn">Right</aegov-button>
<aegov-button field-id="pos-left-btn">Left</aegov-button>
<aegov-button field-id="pos-top-btn">Top</aegov-button>
<aegov-button field-id="pos-bottom-btn">Bottom</aegov-button>

<aegov-drawer field-id="drawer-pos-right" position="right" label="Right-side drawer">
  <h3 id="pos-right-title" class="font-bold text-xl m-0">Right-side drawer</h3>
  <p class="text-base mt-2">Slides in from the right — best for filters and detail panels.</p>
</aegov-drawer>
<aegov-drawer field-id="drawer-pos-left" position="left" label="Left-side drawer">
  <h3 id="pos-left-title" class="font-bold text-xl m-0">Left-side drawer</h3>
  <p class="text-base mt-2">Slides in from the left — best for primary navigation.</p>
</aegov-drawer>
<aegov-drawer field-id="drawer-pos-top" position="top" label="Top drawer">
  <h3 id="pos-top-title" class="font-bold text-xl m-0">Top drawer</h3>
  <p class="text-base mt-2">Drops in from the top — useful for transient toolbars and announcements.</p>
</aegov-drawer>
<aegov-drawer field-id="drawer-pos-bottom" position="bottom" label="Bottom drawer">
  <h3 id="pos-bottom-title" class="font-bold text-xl m-0">Bottom drawer</h3>
  <p class="text-base mt-2">Slides in from the bottom — common on mobile for action sheets.</p>
</aegov-drawer>

<script>
  ['right', 'left', 'top', 'bottom'].forEach(function (pos) {
    var drawer = document.querySelector('[field-id="drawer-pos-' + pos + '"]');
    document.querySelector('[field-id="pos-' + pos + '-btn"]').addEventListener('click', function () { drawer.show(); });
  });
</script>

Sizes

size controls the panel's width for left/right drawers, from xs (320px) to full (100vw). It also scales the inner padding and, when is-pinned="false", the edge gap and corner radius. On viewports narrower than 640px, every left/right size collapses to full width automatically. Top/bottom drawers ignore this prop for height — see Controlling top/bottom height below.

XS — 320px SM — 384px Base — 480px LG — 640px XL — 800px

XS — 320px

Compact strip for notifications and quick-action panels.

SM — 384px

Narrow panel for filter sidebars and compact navigation.

Base — 480px (default)

Standard panel for settings and detail views.

LG — 640px

Wide panel for multi-field forms and data tables.

XL — 800px

Extra-wide panel for complex wizards and rich detail views.

<aegov-button field-id="size-xs-btn" size="sm">XS — 320px</aegov-button>
<aegov-button field-id="size-sm-btn" size="sm">SM — 384px</aegov-button>
<aegov-button field-id="size-base-btn" size="sm">Base — 480px</aegov-button>
<aegov-button field-id="size-lg-btn" size="sm">LG — 640px</aegov-button>
<aegov-button field-id="size-xl-btn" size="sm">XL — 800px</aegov-button>

<aegov-drawer field-id="drawer-size-xs" size="xs" label="XS — 320px">
  <h3 id="size-xs-title" class="font-bold text-lg m-0">XS — 320px</h3>
  <p class="text-base mt-2">Compact strip for notifications and quick-action panels.</p>
</aegov-drawer>
<aegov-drawer field-id="drawer-size-sm" size="sm" label="SM — 384px">
  <h3 id="size-sm-title" class="font-bold text-lg m-0">SM — 384px</h3>
  <p class="text-base mt-2">Narrow panel for filter sidebars and compact navigation.</p>
</aegov-drawer>
<aegov-drawer field-id="drawer-size-base" size="base" label="Base — 480px (default)">
  <h3 id="size-base-title" class="font-bold text-xl m-0">Base — 480px (default)</h3>
  <p class="text-base mt-2">Standard panel for settings and detail views.</p>
</aegov-drawer>
<aegov-drawer field-id="drawer-size-lg" size="lg" label="LG — 640px">
  <h3 id="size-lg-title" class="font-bold text-2xl m-0">LG — 640px</h3>
  <p class="text-base mt-2">Wide panel for multi-field forms and data tables.</p>
</aegov-drawer>
<aegov-drawer field-id="drawer-size-xl" size="xl" label="XL — 800px">
  <h3 id="size-xl-title" class="font-bold text-2xl m-0">XL — 800px</h3>
  <p class="text-base mt-2">Extra-wide panel for complex wizards and rich detail views.</p>
</aegov-drawer>

<script>
  ['xs', 'sm', 'base', 'lg', 'xl'].forEach(function (size) {
    var drawer = document.querySelector('[field-id="drawer-size-' + size + '"]');
    document.querySelector('[field-id="size-' + size + '-btn"]').addEventListener('click', function () { drawer.show(); });
  });
</script>

Controlling top/bottom height

Top and bottom drawers have height: auto by default — the panel grows to fit whatever is slotted in, up to 100dvh. There is no fixed height per size tier for these two positions. To set a specific height, wrap your content in a div and apply the height there — because that wrapper lives in the light DOM (your own markup), ordinary CSS and Tailwind classes work on it directly.

Auto (content height) Half the viewport

Auto height

No height set on the wrapper — the drawer is exactly as tall as this content.

Fixed 50vh

The inner wrapper sets its own height, so the panel is always half the viewport tall.

<aegov-button field-id="height-auto-btn">Auto (content height)</aegov-button>
<aegov-button field-id="height-half-btn">Half the viewport</aegov-button>

<aegov-drawer field-id="drawer-height-auto" position="bottom" label="Auto height">
  <div>
    <h3 id="height-auto-title" class="font-bold text-lg m-0">Auto height</h3>
    <p class="text-base mt-2">No height set on the wrapper — the drawer is exactly as tall as this content.</p>
  </div>
</aegov-drawer>
<aegov-drawer field-id="drawer-height-half" position="bottom" label="Fixed 50vh">
  <div class="h-[50vh]">
    <h3 id="height-half-title" class="font-bold text-lg m-0">Fixed 50vh</h3>
    <p class="text-base mt-2">The inner wrapper sets its own height, so the panel is always half the viewport tall.</p>
  </div>
</aegov-drawer>

<script>
  ['auto', 'half'].forEach(function (v) {
    var drawer = document.querySelector('[field-id="drawer-height-' + v + '"]');
    document.querySelector('[field-id="height-' + v + '-btn"]').addEventListener('click', function () { drawer.show(); });
  });
</script>

Pinned vs. floating

is-pinned="true" (the default) attaches the panel flush against the edge with no border-radius. Set is-pinned="false" to float it with a small gap and rounded corners — a softer, more contained look that pairs well with size="lg" or larger.

Pinned Floating

Pinned drawer

Flush against the edge — the default style.

Floating drawer

A small gap from the viewport edge with rounded corners.

<aegov-button field-id="pin-pinned-btn">Pinned</aegov-button>
<aegov-button field-id="pin-floating-btn">Floating</aegov-button>

<aegov-drawer field-id="drawer-pinned" is-pinned="true" label="Pinned drawer">
  <h3 id="pinned-title" class="font-bold text-xl m-0">Pinned drawer</h3>
  <p class="text-base mt-2">Flush against the edge — the default style.</p>
</aegov-drawer>
<aegov-drawer field-id="drawer-floating" is-pinned="false" size="lg" label="Floating drawer">
  <h3 id="floating-title" class="font-bold text-xl m-0">Floating drawer</h3>
  <p class="text-base mt-2">A small gap from the viewport edge with rounded corners.</p>
</aegov-drawer>

<script>
  document.querySelector('[field-id="pin-pinned-btn"]').addEventListener('click', function () {
    document.querySelector('[field-id="drawer-pinned"]').show();
  });
  document.querySelector('[field-id="pin-floating-btn"]').addEventListener('click', function () {
    document.querySelector('[field-id="drawer-floating"]').show();
  });
</script>

Animation

animation controls the open/close transition. slide (default) translates the panel in from its edge; fade cross-fades it in place; none disables transitions entirely — useful for automated tests or when motion should be suppressed.

Slide Fade None

Slide animation

The panel translates in from the drawer's edge — the default transition.

Fade animation

The panel cross-fades in without directional motion.

No animation

The panel appears and disappears instantly.

<aegov-button field-id="anim-slide-btn">Slide</aegov-button>
<aegov-button field-id="anim-fade-btn">Fade</aegov-button>
<aegov-button field-id="anim-none-btn">None</aegov-button>

<aegov-drawer field-id="drawer-anim-slide" animation="slide" label="Slide animation">
  <h3 id="anim-slide-title" class="font-bold text-xl m-0">Slide animation</h3>
  <p class="text-base mt-2">The panel translates in from the drawer's edge — the default transition.</p>
</aegov-drawer>
<aegov-drawer field-id="drawer-anim-fade" animation="fade" label="Fade animation">
  <h3 id="anim-fade-title" class="font-bold text-xl m-0">Fade animation</h3>
  <p class="text-base mt-2">The panel cross-fades in without directional motion.</p>
</aegov-drawer>
<aegov-drawer field-id="drawer-anim-none" animation="none" label="No animation">
  <h3 id="anim-none-title" class="font-bold text-xl m-0">No animation</h3>
  <p class="text-base mt-2">The panel appears and disappears instantly.</p>
</aegov-drawer>

<script>
  ['slide', 'fade', 'none'].forEach(function (a) {
    var drawer = document.querySelector('[field-id="drawer-anim-' + a + '"]');
    document.querySelector('[field-id="anim-' + a + '-btn"]').addEventListener('click', function () { drawer.show(); });
  });
</script>

No overlay

Set is-overlay="false" to render the drawer without a dimming backdrop, so the page behind stays fully visible — and, paired with is-prevent-scroll="false", scrollable. This suits inspector-style panels that shouldn't interrupt the user's workflow. Even without the visible overlay, clicking outside still closes the drawer when is-close-with-overlay="true" (the default), via an invisible click-catching layer.

Open inspector panel

Quick info

This panel coexists with the page — no backdrop, no scroll lock.

<aegov-button field-id="no-overlay-btn">Open inspector panel</aegov-button>

<aegov-drawer field-id="drawer-no-overlay" is-overlay="false" is-prevent-scroll="false" is-pinned="false" label="Quick info">
  <h3 id="no-overlay-title" class="font-bold text-lg m-0">Quick info</h3>
  <p class="text-base mt-2">This panel coexists with the page — no backdrop, no scroll lock.</p>
</aegov-drawer>

<script>
  document.querySelector('[field-id="no-overlay-btn"]').addEventListener('click', function () {
    document.querySelector('[field-id="drawer-no-overlay"]').show();
  });
</script>

Overlay opacity

overlay-opacity controls how dark the backdrop appears when is-overlay="true". Use light for a subtle hint, base (the default) for standard dimming, and dark for maximum focus on the panel.

Light Base Dark

Light overlay

A subtle dim — the page behind remains quite visible.

Base overlay

The default dimming level.

Dark overlay

A strong dim — focuses maximum attention on the panel.

<aegov-button field-id="opacity-light-btn">Light</aegov-button>
<aegov-button field-id="opacity-base-btn">Base</aegov-button>
<aegov-button field-id="opacity-dark-btn">Dark</aegov-button>

<aegov-drawer field-id="drawer-opacity-light" overlay-opacity="light" label="Light overlay">
  <h3 id="opacity-light-title" class="font-bold text-xl m-0">Light overlay</h3>
  <p class="text-base mt-2">A subtle dim — the page behind remains quite visible.</p>
</aegov-drawer>
<aegov-drawer field-id="drawer-opacity-base" overlay-opacity="base" label="Base overlay">
  <h3 id="opacity-base-title" class="font-bold text-xl m-0">Base overlay</h3>
  <p class="text-base mt-2">The default dimming level.</p>
</aegov-drawer>
<aegov-drawer field-id="drawer-opacity-dark" overlay-opacity="dark" label="Dark overlay">
  <h3 id="opacity-dark-title" class="font-bold text-xl m-0">Dark overlay</h3>
  <p class="text-base mt-2">A strong dim — focuses maximum attention on the panel.</p>
</aegov-drawer>

<script>
  ['light', 'base', 'dark'].forEach(function (o) {
    var drawer = document.querySelector('[field-id="drawer-opacity-' + o + '"]');
    document.querySelector('[field-id="opacity-' + o + '-btn"]').addEventListener('click', function () { drawer.show(); });
  });
</script>

Composing with Card — service detail panel

A right-side drawer surfacing the full detail of a government service from a list view — a heading, structured content, and a primary action.

View service details
Available online

Renew Emirates ID

Federal Authority for Identity, Citizenship, Customs & Port Security

Processing time
3 to 5 working days
Fees
AED 270 (5 years) · AED 370 (10 years)
Required documents
Existing Emirates ID, recent personal photo, proof of residence.
Close Start application
<aegov-button field-id="detail-open-btn">View service details</aegov-button>

<aegov-drawer field-id="drawer-detail" position="right" size="lg" is-pinned="false" label="Renew Emirates ID">
  <header class="pb-6 mb-6" style="border-bottom:1px solid var(--color-aeblack-100)">
    <div class="mb-2"><aegov-badge variant="aegreen" size="sm">Available online</aegov-badge></div>
    <h3 id="detail-title" class="font-bold text-2xl m-0">Renew Emirates ID</h3>
    <p class="text-base mt-2">Federal Authority for Identity, Citizenship, Customs & Port Security</p>
  </header>
  <dl class="mb-6">
    <div class="mb-4">
      <dt class="text-sm font-semibold">Processing time</dt>
      <dd class="text-base">3 to 5 working days</dd>
    </div>
    <div class="mb-4">
      <dt class="text-sm font-semibold">Fees</dt>
      <dd class="text-base">AED 270 (5 years) · AED 370 (10 years)</dd>
    </div>
    <div>
      <dt class="text-sm font-semibold">Required documents</dt>
      <dd class="text-base">Existing Emirates ID, recent personal photo, proof of residence.</dd>
    </div>
  </dl>
  <div class="flex justify-end gap-3">
    <aegov-button variant="secondary" field-id="detail-close-btn">Close</aegov-button>
    <aegov-button field-id="detail-start-btn">Start application</aegov-button>
  </div>
</aegov-drawer>

<script>
  var drawer = document.querySelector('[field-id="drawer-detail"]');
  document.querySelector('[field-id="detail-open-btn"]').addEventListener('click', function () { drawer.show(); });
  document.querySelector('[field-id="detail-close-btn"]').addEventListener('click', function () { drawer.close(); });
  document.querySelector('[field-id="detail-start-btn"]').addEventListener('click', function () { drawer.close(); });
</script>

RTL support

The drawer is direction-agnostic: position values are absolute viewport edges, so position="right" always slides in from the visual right of the screen regardless of dir. Slotted text, alignment, and any nested form controls adapt to dir="rtl" automatically. On open, the drawer pins the direction resolved at its declared position as dir on the host (removed again on close), so a local <div dir="rtl"> wrapper still applies if the drawer has to move out of a trapping ancestor.

عرض تفاصيل الخدمة

تجديد الهوية الإماراتية

الهيئة الاتحادية للهوية والجنسية والجمارك وأمن المنافذ

إغلاق بدء الطلب
<div dir="rtl">
  <aegov-button field-id="rtl-open-btn">عرض تفاصيل الخدمة</aegov-button>

  <aegov-drawer field-id="drawer-rtl" position="right" label="تجديد الهوية الإماراتية">
    <h3 id="rtl-title" class="font-bold text-xl m-0">تجديد الهوية الإماراتية</h3>
    <p class="text-base mt-2">الهيئة الاتحادية للهوية والجنسية والجمارك وأمن المنافذ</p>
    <div class="flex justify-end gap-3 mt-6">
      <aegov-button variant="secondary" field-id="rtl-close-btn">إغلاق</aegov-button>
      <aegov-button field-id="rtl-start-btn">بدء الطلب</aegov-button>
    </div>
  </aegov-drawer>
</div>

<script>
  var drawer = document.querySelector('[field-id="drawer-rtl"]');
  document.querySelector('[field-id="rtl-open-btn"]').addEventListener('click', function () { drawer.show(); });
  document.querySelector('[field-id="rtl-close-btn"]').addEventListener('click', function () { drawer.close(); });
  document.querySelector('[field-id="rtl-start-btn"]').addEventListener('click', function () { drawer.close(); });
</script>

Usage

Here is the recommended usage of a drawer on any website or application. These are recommended usage guides, however the developer must use the best practices of web and application development to accurately use this component.

Always give the drawer an accessible name
Set label to the text of the heading inside the panel, so screen readers announce more than just "dialog" the moment it opens.

Open and close it through show() / close() / toggle()
Drive the drawer from a trigger element's click handler, and keep a reference to that trigger so focus has somewhere sensible to return to on close.

Prefer the right edge for filters and detail panels, and the left edge for primary navigation
This matches common patterns users already expect from other government and consumer services.

Listen for aegovDrawerBeforeClose when the panel has unsaved changes
Call preventDefault() on the event to keep the drawer open and prompt the user, instead of silently discarding their input.

Don't nest a drawer's trigger and its own contents in a way that traps a user who needs the page underneath
If the panel must stay open while the user refers back to the page (a non-blocking inspector), use is-overlay="false" with is-prevent-scroll="false" rather than forcing a modal-style overlay.

Don't bury a long form's primary action below the fold
A drawer's content area scrolls, but its action buttons should stay reachable — pin them to the bottom of the panel rather than letting a long list push them out of view.

API reference

The following are the properties and references of a drawer

aegov-drawer properties

AttributeDescriptionTypeDefault

field-id

DOM id for the dialog element. Auto-generated if omitted.

string

auto-generated

is-open

Whether the drawer is currently open. Prefer the show() / close() / toggle() methods over toggling this directly.

boolean

false

position

Which edge the drawer slides from.

left | right | top | bottom

right

animation

Open/close transition style. none disables transitions entirely.

slide | fade | none

slide

is-pinned

Attach flush to the edge with no border-radius. Set to false to float the panel with a small gap and rounded corners.

boolean

true

is-overlay

Show a dimming backdrop behind the panel.

boolean

true

overlay-opacity

Backdrop dim level. Only applies when is-overlay="true".

light | base | dark

base

is-close-with-overlay

Close the drawer when the backdrop is clicked. Works even when is-overlay="false", via an invisible click-catching layer.

boolean

true

is-prevent-scroll

Lock body scroll while the drawer is open. Reference-counted, so it only unlocks once the last open overlay closes.

boolean

true

is-portal

Allow the drawer to move itself while open when an ancestor would trap it (a transform, filter, contain, z-index stacking context, opacity below 1, or a hidden or inert ancestor). It moves only out of the outermost such ancestor (to document.body as a last resort), returns to where it was declared when it closes, and opens in place when nothing traps it. Set to false only when the drawer is rendered inside another component's shadow DOM and forwards a slot into its content.

boolean

true

size

Panel width for left/right drawers (320px–100vw). Also scales inner padding and, when is-pinned="false", the edge gap and corner radius. Top/bottom drawers ignore this for height — see Controlling top/bottom height.

xs | sm | base | lg | xl | full

base

is-padding

Apply inner content padding. Turn off for full-bleed content.

boolean

true

label

Accessible name for the dialog, set as aria-label on the inner role="dialog" element. Use the text of the visible heading inside the drawer so the spoken name matches what sighted users see.

string

(none)

Slots

SlotDescription

(default)

The drawer content. Structure your own header, body, and action area inside.

Events

EventDetailDescription

aegovDrawerOpen

void

Fired immediately when the drawer begins opening.

aegovDrawerClose

void

Fired after the close animation completes and focus has been returned to the trigger.

aegovDrawerBeforeClose

cancellable

Fired before close() or a closing backdrop click. Call preventDefault() on the event to keep it open — useful for confirming unsaved changes. Not fired for Escape, toggle() or setting is-open to false.

aegovDrawerBackdropClick

MouseEvent

Fired when the backdrop receives a click, regardless of whether is-close-with-overlay allows dismissal.

aegovDrawerEscapePress

KeyboardEvent

Fired when the user presses Escape while the drawer is the topmost open overlay. Cancelling it has no effect — Escape always closes.

Methods

MethodReturnsDescription

show()

Promise<void>

Open the drawer.

close()

Promise<void>

Close the drawer. Fires the cancellable aegovDrawerBeforeClose first.

toggle()

Promise<void>

Flip the open state. Closing this way skips aegovDrawerBeforeClose.

Pass-through attributes

AttributeNotesForwards to

aria-label, aria-labelledby, aria-describedby

Forwarded automatically, but the attribute also stays on the host, where it is not valid ARIA. aria-labelledby and aria-describedby cannot reach an id in your page from inside the shadow root, so they have no effect. Use the label prop instead.

inner dialog element

other aria-*, data-*

Forwarded automatically.

inner dialog element

id

Not forwarded. Use field-id to control the dialog's real id.

n/a

class, style

Applied to the host element — stays host-only. Because aegov-drawer uses Shadow DOM, page-level CSS cannot reach the backdrop or panel elements directly.

host

Notes

The following notes are applicable of this component.

Built-in accessibility

  • The panel renders with role="dialog" and aria-modal="true".
  • Focus is trapped inside the drawer while it is open — Tab and Shift + Tab cycle through its focusable elements only, including focusable elements inside slotted shadow-DOM components (e.g. aegov-button).
  • On open, the first focusable element in the panel receives focus. If the panel has no focusable content, the panel itself is focused so assistive technology still announces it.
  • On close, focus is returned to whatever element opened the drawer.
  • Body scroll is locked while the drawer is open — reference-counted, so it correctly stays locked if another overlay is also open, and only unlocks once the last one closes.
  • Escape always closes the drawer, per WCAG 2.1.2 (No Keyboard Trap), even ahead of a cancellable aegovDrawerBeforeClose listener.
  • The drawer stays where it is declared. Only while it is open, and only if an ancestor would trap its fixed-position layers (a transform, filter, stacking context, or hidden ancestor), it moves out of that ancestor and returns on close (is-portal).
  • While open, the direction resolved at its declared position is pinned as dir on the host, so slotted content keeps an ancestor's dir="rtl" even after a move. A dir you set on the host yourself is left alone.

Developer responsibilities

  • Always label the drawer. Set the label prop to the text of the visible heading inside the panel. Without it, screen readers announce only "dialog". Do not rely on aria-labelledby on the host: the dialog lives in a shadow root and cannot resolve an id in your page.
  • Drive the drawer through a trigger element's click handler calling show() — this is also what lets the component correctly capture and restore focus to that specific trigger on close.
  • For navigation drawers, use a <nav> element inside the panel and ensure every link is keyboard-reachable.
  • Keep a drawer's primary action reachable — a long list of content should scroll inside the panel rather than pushing its action buttons out of view.
  • Listen for aegovDrawerBeforeClose and call preventDefault() if the panel contains unsaved changes, to prompt the user before discarding them.

Keyboard support

Key Function
Escape Closes the drawer and returns focus to the trigger element. With overlays stacked (a modal opened from the drawer), only the top one responds to Escape and Tab.
Tab Moves focus to the next focusable element inside the panel, wrapping to the first once past the last.
Shift + Tab Moves focus to the previous focusable element inside the panel, wrapping to the last once past the first.
Enter, Space Activates the focused button or control.