Skip to content
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

Closed
laryn opened this issue Sep 5, 2024 · 4 comments
Closed

A11Y: Tabbing Manager #6704

laryn opened this issue Sep 5, 2024 · 4 comments

Comments

@laryn
Copy link
Contributor

laryn commented Sep 5, 2024

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:

For some interactions, you may want to guide a non-visual user to the most important elements on the page. For example, the Contextual module constrains tabbing to the contextual links when the global edit mode is enabled...

I wanted to note this here as a potential accessibility improvement we could consider porting over, as was done previously with Announce.

@quicksketch
Copy link
Member

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 Drupal.contextualToolbar.AuralView() (part of contextual.js), and that one usage is slated to be removed from Drupal 12.

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.

@quicksketch
Copy link
Member

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.

@laryn
Copy link
Contributor Author

laryn commented Oct 28, 2024

@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.

@laryn laryn closed this as completed Oct 28, 2024
@quicksketch
Copy link
Member

Thanks for filing the issue regardless, I wasn't aware of this capability in Drupal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants