widget
A self-contained interactive piece of an interface, such as a tab panel, date picker or accordion.
In more detail
Native HTML controls such as select and details are widgets built into the browser. Custom widgets built from divs need ARIA roles, states and keyboard handling to match what native controls give for free.
Example
The course streams a slow recommendations widget inside its own Suspense boundary and loads chat widgets with lazyOnload.Related terms
- ARIA — The W3C standard of HTML attributes, such as role and aria-expanded, that tell assistive technology what a custom widget is and what state it is in.
- accordion — A vertical stack of headings that each expand or collapse a panel of content.
- component — A reusable, self-contained piece of interface, such as a card or a modal, with its own markup, styles and behaviour.
- third-party script — JavaScript from another company that runs on your site, such as analytics, ads, chat widgets or maps.
- keyboard navigation — Using a page entirely with the keyboard: Tab to move between controls, Enter and Space to activate, arrow keys inside widgets, Escape to close.
- roving tabindex — A technique where only the active item in a group has tabindex="0" and the rest have tabindex="-1", so the group is one tab stop and arrow keys move between items.
- compound component — A set of components designed to be used together, such as Tabs, Tabs.Trigger and Tabs.Panel, that share state behind the scenes.
Taught in
- Accessibility Tree, ARIA Roles, States And Live Regions — Frontend Architecture & Web Platform
- MutationObserver: Reactive DOM Watching Without Polling — Frontend Architecture & Web Platform
- Client Components: use client & Hydration Models — Next.js 15 & Modern App Router Architecture
- Component Tree Composition: Interleaving RSC & Client — Next.js 15 & Modern App Router Architecture
- Granular Suspense: Resolving Waterfall Bottlenecks — Next.js 15 & Modern App Router Architecture
- Script Optimization: next/script & Lazy Third Parties — Next.js 15 & Modern App Router Architecture
- Compound Components: Inversion of Control with Context — React 19 & Modern Component Architecture
- Slot Patterns And Headless UI Architecture in React — React 19 & Modern Component Architecture
- Custom Hook Composition: Encapsulating Reactive Logic — React 19 & Modern Component Architecture
- Suspense Architecture: Promises, Fallbacks, And Co-ordination — React 19 & Modern Component Architecture
- Error Boundaries: componentDidCatch And Fallback UI Trees — React 19 & Modern Component Architecture
- Accessible Headless Primitives: ARIA, Focus, And Keyboard — React 19 & Modern Component Architecture