Focus Management
Deliberately controlling which element receives keyboard focus as an interface changes.
Focus management is the deliberate control of what has keyboard focus as the interface changes. For anyone navigating by keyboard or screen reader, focus is their position in the page — losing it means losing their place entirely, usually back at the top.
The obligations are straightforward to state. Opening an overlay moves focus into it. Closing it returns focus to whatever opened it. Removing the focused element moves focus somewhere sensible rather than letting it fall to the document body. Navigating to a new view announces and focuses the new content.
Return-focus is where implementations usually break, and the cause is subtle: capturing the currently focused element on open is not enough if the opener is unmounted while the overlay is showing. The captured node is detached by the time you try to restore, and focusing a detached node silently does nothing. The fix is an explicit reference to the remounted opener rather than a captured node.
A companion bug: a return-focus effect that also fires on first mount, with nothing having been opened, steals focus on every page load. Guarding on "has actually opened once" is the fix, and the case worth testing explicitly.
Component tests can catch a lot of this, provided the test harness reproduces the real structure — a demo whose opener stays mounted will pass while the real application is broken.
See also15
Focus Trap
Confining keyboard focus inside a modal surface so it cannot wander behind it.
Design & Interface13 connections
Component Story
An isolated rendered instance of a component, usable as documentation, a workbench, and a test.
Testing & Verification17 connections
Portal
Rendering an element into a different part of the document than its logical parent.
Web Platform18 connections
Headless Component
A component supplying behavior and accessibility with no styling of its own.
Design & Interface16 connections
contenteditable
The HTML attribute that makes an element directly editable, and the surface behind most rich-text editors.
Web Platform12 connections
Keyboard Navigation
Making every interactive affordance reachable and operable without a pointer.
Design & Interface34 connections
Accessibility
Designing so that people with disabilities can use a thing, and the standards that make it checkable.
Design & Interface44 connections
Document Object Model
The live tree of objects a browser builds from a document, and the surface every UI framework writes to.
Web Platform27 connections
ARIA
Attributes that describe roles, states, and relationships to assistive technology when HTML cannot.
Design & Interface31 connections
Semantic HTML
Using elements for their meaning, so the document conveys structure without extra description.
Design & Interface24 connections
Carousel
A panel that rotates through several slides in one spot, popular on home pages as a way to give everyone's content top billing, and notorious for low engagement and accessibility problems.
Design & Interface10 connections
Tabs
A row of labels that switch between panels of content occupying the same space, borrowed from paper folder tabs, suited to parallel sections viewed one at a time, and governed by a specific keyboard pattern.
Design & Interface12 connections
Bottom Sheet
A panel that slides up from the bottom of a phone screen to show extra content or choices, often draggable between heights, placed where thumbs can reach it on large phones.
Design & Interface13 connections
Focus Indicator
The visible outline or highlight showing which element on a screen will receive keyboard input, essential for anyone who doesn't use a mouse, and for years routinely removed by designers who found it unattractive.
Design & Interface12 connections
Toast Notification
A brief, non-blocking message that slides in to confirm an action or report a background event, then disappears on its own.
Design & Interface10 connections
Linked from27
- AccessibilityDesign & Interface
Designing so that people with disabilities can use a thing, and the standards that make it checkable.
- Accessibility TestingTesting & Verification
Checking that people using screen readers, keyboards, magnification, or other assistive technology can actually use an interface, through a mix of automated scans and hands-on testing.
- ARIADesign & Interface
Attributes that describe roles, states, and relationships to assistive technology when HTML cannot.
- Bottom SheetDesign & Interface
A panel that slides up from the bottom of a phone screen to show extra content or choices, often draggable between heights, placed where thumbs can reach it on large phones.
- CarouselDesign & Interface
A panel that rotates through several slides in one spot, popular on home pages as a way to give everyone's content top billing, and notorious for low engagement and accessibility problems.
- Command PaletteDesign & Interface
A keyboard-summoned search box that finds and runs any command by typing part of its name, giving power users speed without forcing every feature into menus.
- Component StoryTesting & Verification
An isolated rendered instance of a component, usable as documentation, a workbench, and a test.
- contenteditableWeb Platform
The HTML attribute that makes an element directly editable, and the surface behind most rich-text editors.
- Context MenuDesign & Interface
A menu of actions for the thing under the pointer, opened by right-click or long press, which saves travel and narrows choices but is invisible until summoned, so it should never be the only route to an action.
- Document Object ModelWeb Platform
The live tree of objects a browser builds from a document, and the surface every UI framework writes to.
- Focus IndicatorDesign & Interface
The visible outline or highlight showing which element on a screen will receive keyboard input, essential for anyone who doesn't use a mouse, and for years routinely removed by designers who found it unattractive.
- Focus TrapDesign & Interface
Confining keyboard focus inside a modal surface so it cannot wander behind it.
- Headless BrowserTesting & Verification
A real browser driven programmatically without a visible window.
- Headless ComponentDesign & Interface
A component supplying behavior and accessibility with no styling of its own.
- Keyboard NavigationDesign & Interface
Making every interactive affordance reachable and operable without a pointer.
- Modal DialogDesign & Interface
A window that blocks the rest of the interface until it is dealt with, useful for decisions that truly demand attention and overused for almost everything else.
- PortalWeb Platform
Rendering an element into a different part of the document than its logical parent.
- Reduced MotionDesign & Interface
An operating-system preference signaling that animation should be minimized, for real medical reasons.
- Screen ReaderDesign & Interface
Software that turns an interface into speech or braille for people who can't see the screen, which navigates by structure rather than reading top to bottom, and exposes every shortcut a sighted design took.
- Semantic HTMLDesign & Interface
Using elements for their meaning, so the document conveys structure without extra description.
- Single-Page ApplicationWeb Platform
A web app that loads one HTML page and then rewrites it with JavaScript as the user navigates, trading a slower, heavier first load for app-like transitions afterwards.
- Stacking ContextDesign & Interface
The nested coordinate system that decides what paints above what, and why z-index often does nothing.
- Staggered AnimationDesign & Interface
Offsetting the start of sibling animations so a group reveals in sequence.
- Tiling Window ManagerDesign & Interface
A window manager that arranges windows automatically into non-overlapping tiles and is driven mainly from the keyboard, trading freeform placement for zero layout effort.
- Toast NotificationDesign & Interface
A brief, non-blocking message that slides in to confirm an action or report a background event, then disappears on its own.
- TooltipDesign & Interface
A small label that appears when hovering or focusing an element, useful for naming icons and easy to make inaccessible, unreachable on touch, or covered by other layers.
- View TransitionsWeb Platform
A browser API that animates between two states of a page, or between two pages, by snapshotting the old and new views and morphing between them.