Websites & patient experience · Website help · Dialogs and overlays

Return focus to the control that opened a dialog

Closing a dialog can leave keyboard focus on the document body or an element that no longer exists. Visitors must navigate from the start to resume their original task.

What to change

Ask for a predictable return point after dismissal, normally the opener or a sensible successor if that opener is gone.

A worked example

Illustrative example

A visitor opens more details for a service, reads them and closes the panel. Focus returns to that service's details control so exploration can continue.

How to check the result

Accept when dismissal leaves the visitor at an understandable place in the original task rather than an invisible or arbitrary destination.

A mistake to avoid

Scrolling the opener into view is helpful but insufficient if keyboard focus still remains somewhere unrelated.

Your action checklist

Use these checks to prepare a discussion with your team or supplier. Tick a check when you have recorded the decision or evidence, rather than when a feature has simply been promised.

Decisions to record

Entries stay in this page and are not submitted to Kay & Co. Download your notes before leaving; the page does not save them.

Healthcare website design showing connected desktop and mobile service and enquiry layouts.
Make the service and next step clear on every screen.
Healthcare website accessibility illustrated by a focus outline, keyboard key, contrast samples and form.
Review keyboard access, contrast and understandable form fields.
Healthcare website testing with desktop and mobile forms, a checklist and success and error states.
Check complete journeys and explain failures clearly.

Further reading

These primary sources provide additional context for the project decisions above.

Related decisions

Turn the brief into a working service

Kay & Co. can help you scope the work, design the experience and deliver the right solution for your organisation.

Explore websites & patient experience services or discuss your project.

Try the free Healthcare Digital Planner to find your starting priority.