-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A11Y: Tabbing Manager #6704
Comments
From my understanding of this feature, it would make it possible to constrain the focus of elements via the tab key to a subsection of the page. I could see this being useful for constraining focus when using a modal dialog and the rest of the page is "locked" until the modal is closed. However, I don't think we have that behavior in core. Modals don't prevent interacting with the rest of the page and in some cases (like Token browser) it's very important that the rest of the page still be accessible. I tried to find where in Drupal 10+ this feature is used, and it seems to me that the feature might have been used at one point but is not any longer. Searching the whole code base (with 50+ common contrib modules installed) I only found one usage in See these searches on Drupal 11.x codebase: TabbingManager and tabbingContext. I think generally seems like a useful capability, but I'm not sure if we should add it if it's so rarely used. If a front-end theme needed to lock focus access, they would probably do it in their own modal dialog code; so I see this most useful for improving administrative UI accessibility, but I don't know if we have a use-case for that currently. |
On further testing, it seems that jQuery UI dialogs already implement a focus trap (see https://bugs.jqueryui.com/ticket/3768/). When a modal or dialog is open in Backdrop, the focus is already locked to the contents of the dialog thanks to jQuery UI's implementation. |
@quicksketch Thanks for looking this over. I guess it seems like this may not be necessary in core at the moment, so I will close the issue. The piece I quoted does reference a concept/example unrelated to modals that I'm interested in (e.g. an "Edit mode" that makes tabbing only jump between contextual edit links, or similar) but if I ever get around to implementing I will just have to implement a "focus trap" solution as part of it. |
Thanks for filing the issue regardless, I wasn't aware of this capability in Drupal. |
Description of the need
I was talking to a colleague about the Announce functionality that is available in Backdrop and Drupal, and came across this page, which mentions Drupal's Tabbing Manager functionality in relation to accessibility and Javascript:
I wanted to note this here as a potential accessibility improvement we could consider porting over, as was done previously with Announce.
The text was updated successfully, but these errors were encountered: