WebAIM - Web Accessibility In Mind

E-mail List Archives

for

From: Sumit Patel
Date: Mar 26, 2025 1:18AM


Hi all,
I hope you’re doing well. I have a query regarding a keyboard trap issue in
one of our webpages.
The page in question is a search page. After performing a search, results
are displayed below the search field. In between the search field and the
results, there are four tabs that can be used to filter the search results.
For example, selecting the first tab shows all results, while selecting any
other tab will display only related results.
However, I’ve encountered an issue when navigating through the page using
the keyboard. Upon tabbing into the tab group, the focus gets trapped
within this group. This means that, using the Tab or Shift + Tab keys, I
can only navigate through the four tabs and cannot move beyond them. Each
tab receives separate tab focus, and arrow keys cannot be used to navigate
through the group.
We’ve reported this issue as a failure under WCAG SC 2.1.2 (Keyboard Trap).
The development team has indicated that this behavior is part of the
intended functionality and cannot be changed. As a workaround, they have
implemented the Escape key feature: when pressing the Escape key while in
the tab group, users can exit the trap and resume normal navigation using
Tab or Shift + Tab to move to the next or previous interactive element.
While this approach allows users to continue navigating via the keyboard,
I’m concerned about how a keyboard-only user would know to press the Escape
key to escape the trap. It’s not immediately clear that this is the
solution.
Given this, I would like to know if we can proceed with accepting this
workaround, or if there are alternative suggestions we should consider to
ensure compliance with WCAG 2.1.2.
Looking forward to hearing your thoughts on this.

Regards,
Sumit.