We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Home
End
I suggest to improve tab navigations (e.g. .nav-tabs) accessibility with the keyboard:
.nav-tabs
The idea is taken from the W3C example.
This could be useful for users using keyboards, and this enhancement would be the continuation of #33079 (keyboard accessibility with arrow keys).
I've already implemented it in one of my website. This is much the same as the implementation for arrow keys. My jQuery code looks like below:
$(document).on('keydown', '.nav-link[data-bs-toggle="tab"]', (event) => { if (['Home', 'End'].includes(event.key)) { event.preventDefault(); const $tabs = $(event.currentTarget).parents('.nav[role="tablist"]').find('.nav-link[data-bs-toggle="tab"]').not('.disabled'); const $tabToShow = (event.key === 'Home') ? $tabs.first() : $tabs.last(); $tabToShow.get(0).focus({ preventScroll: true }); $tabToShow.tab('show'); } });
The text was updated successfully, but these errors were encountered:
Hi, I would like to work on this issue. Could you pl assign it to me?
Sorry, something went wrong.
Hi, I think @julien-deramond could assign this issue to you. Thanks for your help.
Successfully merging a pull request may close this issue.
Prerequisites
Proposal
I suggest to improve tab navigations (e.g.
.nav-tabs
) accessibility with the keyboard:Home
: moves focus to the FIRST tab and activates it.End
: moves focus to the LAST tab and activates it.The idea is taken from the W3C example.
Motivation and context
This could be useful for users using keyboards, and this enhancement would be the continuation of #33079 (keyboard accessibility with arrow keys).
I've already implemented it in one of my website. This is much the same as the implementation for arrow keys. My jQuery code looks like below:
The text was updated successfully, but these errors were encountered: