Skip to main content

Accessibility: autofocus and focus loops

Learn more about autofocus and focus loops in Consent Studio CMP

Updated this week

Autofocus and Focus Loops in the Consent Studio CMP (cookie) consent banner

The Consent Studio CMP consent banner includes two focus management features that help keyboard and screen reader users navigate the banner efficiently.

Autofocus automatically moves keyboard focus to a specific element when the banner opens. This means users can start interacting with the banner immediately, without having to Tab through the rest of the page first.

Autofocus Target lets you choose which element receives focus:

  • Header: the banner's title or description area

  • First Toggle: the first cookie category toggle

  • Accept All (default): the Accept All button

  • Reject All: the Reject All button (only shown when this button is enabled in your banner layout)

  • Accept Selection: the Accept Selection button

  • Customise: the Customise button (this options is only shown when this button is enabled in your banner layout)

Focus Loop keeps keyboard focus trapped inside the banner while it's open. When a user presses Tab and reaches the last interactive element, focus jumps back to the first element. Pressing Shift+Tab from the first element moves focus to the last. This prevents users from accidentally tabbing out of the banner and into the page behind it. The focus loop applies to both the main consent banner and the cookie overview modal.

Both features can be enabled or disabled under Banner β†’ Basics β†’ Accessibility. They are enabled by default and free on all plans. Choosing a custom autofocus target requires a Professional plan.

Did this answer your question?