Understand the boundary

An appointment widget may be supplied by a separate company but it is still part of the journey offered on your page. A customer can Tab from your service description into the booking frame, select a date and then discover that every further Tab cycles inside the frame. WCAG 2.2 success criterion 2.1.2 says that if focus can move to a component using a keyboard, it must be possible to move away using only a keyboard. If leaving requires something other than ordinary arrow or Tab keys or another standard exit method, the person must be advised how to leave. A mouse-only escape fails the customer's practical need.

The problem is not that focus temporarily stays inside a component. A properly opened modal booking dialog can limit focus while it is active, provided the customer knows how to dismiss it and can return to the page. A calendar grid may use arrow keys between dates and Tab to its next control. The trap arises when no keyboard path reaches the controls after the widget, the close action, or a documented exit. Test the actual interaction rather than declaring every repeated focus movement a failure. Also distinguish a missing visible focus indicator from a true trap: both deserve repair, but their causes differ.

List who controls each layer before proposing a fix. Your team controls the host page, link to the appointment flow, placement of the frame and perhaps the trigger button. The provider may control the calendar, its scripts, focus management and closing behaviour. A cross-origin frame generally prevents the host from directly rewriting the provider's internal interface. That boundary is a reason to test and escalate, not a reason to mark the issue outside your responsibility. Ask the provider for a demonstrated keyboard path in the exact version you embed, including how focus returns to the host page.

Reproduce a complete keyboard journey

Start in a fresh browser session at the service page. Put the pointer aside and use only Tab, Shift+Tab, Enter, Space, the arrow keys where the widget instructs, and Escape where relevant. Record the focus location immediately before entry, the first focusable element inside the frame, the sequence through date and time selection, and the first element reached after exit. Repeat in reverse with Shift+Tab. A one-way exit may still strand someone who wants to return to the service description. Watch the visual focus and listen with a screen reader where possible, but do not let either substitute for proving actual keyboard exit.

Test more than the empty widget. A calendar may work on its first screen and trap focus after a date is chosen, an unavailable time is shown, validation fails, or a confirmation appears. Repeat with a valid selection, an invalid or incomplete submission and a cancel action. If login or payment opens a second embedded panel, include that transition. Capture the provider version, browser, device, viewport and exact key sequence so the supplier can reproduce the fault. The aim is a reproducible customer path, not a vague report that 'accessibility feels broken'. Avoid entering real customer information during the test.

A worked example is a physiotherapy practice whose page places a booking frame between treatment details and contact information. Keyboard focus enters the calendar, reaches a time slot, then cycles between the slot and a hidden help icon. The user cannot reach the contact link below or return to the heading above. The practice should first record that sequence and ask the provider to correct the frame's focus order or supply a keyboard exit. Meanwhile it can offer a normal link to an accessible standalone booking page or a clearly described alternative contact route, after testing that route too. This example illustrates diagnosis, not a claim about a real supplier.

Check the point where a provider-controlled frame loads slowly or fails. If focus enters a loading indicator and the provider script never completes, the customer still needs to move back to the host page and use another appointment route. A test on a fast office connection can miss this state, so repeat once with a slowed connection or a deliberately unavailable test endpoint if your environment supports it. The host should show a clear fallback link outside the frame and avoid hiding the rest of the page while waiting. This is a resilience check tied to the same keyboard exit question, not a promise that every provider outage can be prevented.

Choose a repair that the customer can use

The cleanest repair is usually inside the widget: normal Tab and Shift+Tab movement into and out of its controls, or a clear close button and return path when the interaction is intentionally modal. If a special key combination is genuinely needed, explain it in visible, accessible text before the person enters the component and within the component where feasible. Do not rely solely on an instruction in a support article the trapped person cannot reach. The W3C G21 technique describes allowing Tab to leave, providing a documented keyboard exit, or documenting a technology's native move-to-parent command before entry.

If the supplier cannot fix the embedded version promptly, assess whether a direct link to its full-page booking flow behaves better. Test it from entry through confirmation and back, not merely that the link opens. If it still traps users, offer a workable appointment request route such as a standard form or telephone contact with clear service hours and what information to provide. A fallback should preserve the customer's ability to request the same service without forcing them to explain their disability. Do not describe a telephone number as a complete digital fix; it may be useful continuity while the broken component is repaired.

Do not patch the host page with an automatic focus jump that fires whenever the frame gains focus. It may prevent a customer from using the calendar at all. Nor should the host capture every Escape key without knowing whether the widget needs it to close an internal menu. Coordinate a tested change with the provider and verify the boundaries on desktop and mobile keyboards. If the widget is removed, check that old appointment links and instructions point to the replacement. The correct fix is measured by whether the user can enter, perform or abandon the task and continue elsewhere on the page.

When discussing a repair with the supplier, ask for a small acceptance demonstration rather than a generic accessibility statement. Give them the exact entry focus, key sequence and state that failed, then require a recording or test environment showing forward exit, reverse exit and a return from confirmation. Verify it yourself in the host page because the supplier's standalone demo may have a different frame boundary. If the provider proposes a special shortcut, check that it does not conflict with browser or assistive-technology commands in your target setup and that the instruction is available before the customer needs it.

Make the acceptance test explicit

Write an acceptance path that another staff member can repeat: reach the page from a normal link, Tab into the widget, select a slot, leave forward to the following content, return backward, cancel, and recover after an error. Record whether a custom exit is announced before entry and whether it works. Test in both English and Traditional Chinese if the business offers both, because a translated widget may change label lengths, control order or the instructions for special keys. Keep a short video or key log within your own private issue tracker if useful, but the public article should never imply a vendor has been audited unless you actually tested it.

Review the widget whenever the provider changes its script or booking flow, and after your own page template changes. A vendor update can alter focus order without changing the page's visible branding. Put the keyboard journey into supplier acceptance requirements so a new booking system is assessed before purchase or rollout. If the team cannot reproduce a reported trap, ask for the exact device and step, then test at that boundary. A passing run on one browser is useful evidence for that configuration, not proof that every assistive technology and device combination works.

Finally, make a business decision about the remaining defect. If keyboard users cannot escape or complete the appointment, do not call the embedded journey ready simply because a booking can be made with a mouse. Keep a tested alternative visible while the provider repairs the frame, and track who owns that follow-up. When the provider claims a fix, repeat the same recorded key sequence and the reverse route, then verify confirmation and abandonment states. The customer should be free to leave the widget as deliberately as they entered it, with a predictable next focus location.

Before you proceed

  • Can a keyboard user enter and leave the widget in both directions?
  • Can they leave after an error, cancellation and confirmation?
  • Is any nonstandard exit explained before entry and tested?

Sources & further reading