UI + UXDisclosure And Attention Managementanti-pattern
Drawer with no close or return path
Treat missing drawer close and return paths as an anti-pattern: every temporary drawer needs visible close, keyboard and route dismissal, focus return, state preservation, and responsive back behavior that matches the opener and selected object.
Use this anti-pattern to review temporary drawers, inspectors, side sheets, and mobile drawer layouts for missing close and return behavior.
Use it when generated UI creates a side panel but does not define close, Escape, back, focus return, or page-state preservation.
Avoid when
The surface is a permanent side panel or details panel and is not meant to close.
The drawer already has visible close, Escape or back behavior, focus return, and page-state preservation.
The issue is primarily wrong drawer content, such as navigation mixed into contextual detail.
The content is actually a modal dialog or full page with its own complete dismissal and navigation contract.
Problem it prevents
A drawer opens from the current page but lacks a reliable way to dismiss it and return to the exact context that launched it.
Pattern anatomy
What a strong implementation has to make clear
User need
A side drawer, inspector, side sheet, mobile full-screen drawer, or navigation drawer opens over or beside the current page.
Pattern promise
Treat missing drawer close and return paths as an anti-pattern: every temporary drawer needs visible close, keyboard and route dismissal, focus return, state preservation, and responsive back behavior that matches the opener and selected object.
Required state
Closed state with a clear opener and remembered return target.
Recovery path
No visible close control.
Access contract
Do not create a keyboard trap inside a drawer; every temporary drawer needs an exit path that keyboard users can discover and operate.
Quality bar
The difference between expert and weak execution
Strong implementation
Specific, visible, recoverable
A case details drawer names Claim C-1042, has a Close details button in the header, supports Escape, and shows focus will return to the selected row.
A mobile full-screen drawer has a Back to queue control, selected case title, and keeps the urgent filter when returning.
A reviewer opens a drawer, switches rows, presses Escape, and lands back on the current selected row with filters preserved.
Browser back closes the temporary drawer once and leaves the user in the same result set rather than navigating away unexpectedly.
Weak implementation
Vague, hidden, hard to recover from
A right drawer slides over a table with no close button and no Escape response.
The drawer closes visually but sends keyboard focus to the page header and clears the selected row.
A keyboard user tabs through a drawer repeatedly because there is no close target or documented Escape exit.
A touch user cannot return from a full-screen inspector without refreshing the page.
UI guidance
Treat a drawer without visible close, Escape, back, scrim, or focus-return behavior as an anti-pattern even when the drawer content itself is useful.
Provide a labelled close affordance, object title, dismissal status, and responsive back route in the drawer header or persistent action area, not behind hover, gesture-only, or overflow-only controls.
UX guidance
Use this anti-pattern during review when opening a drawer leaves users uncertain how to get back to the row, filter, list, map, chart, or workflow that launched it.
Design drawer exits as one recovery contract: users can close intentionally, keep or discard unsaved work, return focus locally, and resume with selection, filters, scroll position, and responsive context intact.
Implementation contract
What the implementation must handle
States
Closed state with a clear opener and remembered return target.
Open state with selected-object title, labelled close button, and visible relationship to the originating context.
Keyboard dismissal state where Escape closes or opens a scoped discard review.
Browser back or route dismissal state that closes the drawer without losing page context.
Interaction
Opening the drawer records the opener or selected object as the return target.
The drawer exposes a labelled close control that remains reachable at the top or in a persistent action area.
Escape closes dismissible drawers or moves focus into a scoped discard review when dirty state exists.
Browser back, route changes, scrim clicks, close button, and programmatic close use the same cleanup path.
Accessibility
Do not create a keyboard trap inside a drawer; every temporary drawer needs an exit path that keyboard users can discover and operate.
Use a visible heading and labelled close control so assistive-technology users understand the surface and dismissal target.
Return focus to the opener or selected object after every close path.
If the drawer is modal, make background content inert and contain focus intentionally until close.
Review
What exact element receives focus after each close route?
Can pointer, keyboard, touch, screen reader, and route/back users all leave the drawer?
Does the drawer preserve the row, filter, scroll, and draft state that existed before opening?
What happens if the selected object changes while the drawer is open?
Interactive lab
Inspect the states before you copy the pattern
Recover from temporary drawer exits
Inspect close button, Escape close, browser back, scrim close, focus return, selected-object switching, dirty review, mobile back, sticky header, state preserved, gesture equivalent, and commit lock states; compare no close, dead Escape, bad back, lost focus, reset state, mobile no back, gesture-only close, and dirty trap failures.
Drawer with no close or return path
Interactive demo is ready
Launch the live UI/UX lab when you want to inspect states, keyboard behavior, and common failure modes.
State To Inspect
Closed state with a clear opener and remembered return target.
Keyboard / Access
Enter or Space on the opener opens the drawer and records the return target.
Avoid Generating
Hiding close in an overflow menu or offscreen toolbar.
Supports predictable focus movement and return after drawer dismissal.
Full agent/debug reference
Problem Context
A side drawer, inspector, side sheet, mobile full-screen drawer, or navigation drawer opens over or beside the current page.
The surface is temporary, contextual, or responsive rather than a permanent workspace pane.
Users need to return to a specific row, card, filter result, map marker, chart point, or navigation trigger after closing.
The drawer may include dirty fields, selected-object switching, scrim dismissal, browser back handling, or narrow viewport layout changes.
Selection Rules
Flag this anti-pattern when a temporary drawer has no visible close control, no Escape path, no back-route dismissal, no equivalent for gesture-only close, or no predictable focus return.
Flag it when the drawer closes but loses the selected object, scroll position, active filter, draft text, route state, or opener focus.
Use a standard drawer when the panel is temporary supplemental content with explicit close and return behavior.
Use a details panel when the content is persistent workspace layout and close is not part of the contract.
Use a modal dialog when background interaction must be blocked and focus must be contained until users complete or cancel the task.
Use navigation drawer when the panel changes destinations; still provide dismissal, selected destination state, and focus recovery.
Use a full page when the drawer needs long editing, history, shareable URL state, or complex return management.
If unsaved work blocks immediate close, show a discard or save decision rather than trapping users by removing dismissal.
Required States
Closed state with a clear opener and remembered return target.
Open state with selected-object title, labelled close button, and visible relationship to the originating context.
Keyboard dismissal state where Escape closes or opens a scoped discard review.
Browser back or route dismissal state that closes the drawer without losing page context.
Scrim or outside-click state where temporary modal drawers either dismiss predictably or explain why dismissal is blocked.
Focus return state where close restores focus to the opener, selected row, or next logical object.
Object-switching state where the return target updates when selection changes.
Dirty-edit state where closing asks whether to keep editing, discard, or save.
Mobile or narrow viewport state with a visible Back or Close route and preserved list/filter context.
Bad state showing missing close, missing Escape, lost focus, lost page state, gesture-only close, and no mobile return.
Interaction Contract
Opening the drawer records the opener or selected object as the return target.
The drawer exposes a labelled close control that remains reachable at the top or in a persistent action area.
Escape closes dismissible drawers or moves focus into a scoped discard review when dirty state exists.
Browser back, route changes, scrim clicks, close button, and programmatic close use the same cleanup path.