Skip to content

Commit

Permalink
Ensure translation links are not keyboard focus when menu is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
neilblair committed May 2, 2023
1 parent 740094f commit 9d99c9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions origins_translations/js/origins-translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
let $button = $('.origins-translation-button', elm);
let $menu = $('.origins-translation-menu', elm);

// Initially menu is hidden, so ensure menu links are not
// keyboard focusable.
$menu.find('a').attr('tabindex', '-1');

// Aria-expanded attribute on the button is used as
// CSS hook to show/hide the menu and enable/disable
// keyboard focus on menu links.
Expand Down

0 comments on commit 9d99c9d

Please sign in to comment.