Skip to content
Browse the guide
Components

Disclosure and panels

Choose visible sections, disclosure, tabs and pages without losing work.

On this page

Hiding information reduces the visible amount, but can increase search and memory demands. Begin with ordinary visible sections when people need to read sequentially or compare content.

#Choose what can be hidden

NeedSuitable starting pointCost to check
Essential instructions or comparisonVisible sections with headingsLength and scanning
Optional local detailDisclosure button or native detailsDiscoverability and retained state
Several independent optional sectionsAccordion; allow multiple open when comparison mattersRepeated opening and hidden errors
Peer views in a stable taskTabs with associated panelsActivation latency and hidden edits
Distinct destination or substantial taskAnother page with a real URLReturn context and task continuity

Do not hide a prerequisite simply to shorten the page. A set of filter buttons is not automatically a tablist. An accordion's one-open rule is a choice, not a requirement. See GOV.UK accordion guidance.

#Define expansion and activation

Expose expanded state and the controlled region for a custom disclosure; native details already provides its contract. Ordinary disclosures normally keep focus on the trigger. Tabs require the complete tab/tabpanel relationship and keyboard model. Automatic activation is appropriate only when panel presentation has no noticeable latency; otherwise let arrow keys move focus and Enter/Space activate. Follow APG tabs.

When an operation hides the currently focused control, move focus deliberately to a surviving trigger or logical location. Do not move it just because new optional content became visible. Never leave focus inside an inert or removed panel.

#Preserve work and discovery

Keep entered values when switching panels unless the task explicitly discards them. Reveal the section containing a validation error before directing focus there. If panels have shareable URLs, restore the correct panel on direct load and Back without inventing redundant history entries.

Browser find and print support differ for hidden/unmounted content. Test the actual implementation; provide an expanded reading/print view when discovery requires it. Do not assume a collapsed heading makes its contents searchable.

#Verify

Compare the same content visible and collapsed. Use keyboard, first touch, a slow panel, a long label, hidden invalid input and a return from another page. A short, readable group should remain visible when hiding it adds effort without benefit.

Compare actual component contracts

Contract specimens

Separate actions

Other draft actions

Manual tabs with a delayed panel

Arrows move focus; Enter or Space activates.

Multiple values and grouped navigation

  • Maya
Related guidanceSelection guidance

This grouped navigation uses disclosure and links; it is not a tree widget.

Read-only, disabled and busy

The read-only value is submitted; native disabled is excluded. ARIA-disabled requires explicit event suppression. Busy is not a success state.

Local data and simulated outcomes. Follow the acceptance walkthrough in the guide, including interruption and recovery.