Skip to content

Commit

Permalink
Merge pull request #271 from dof-dss/origins-translations-fix
Browse files Browse the repository at this point in the history
Ensure translation links are not keyboard focusable when menu is enabled
  • Loading branch information
neilblair authored May 2, 2023
2 parents 740094f + 9d99c9d commit a6cb633
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 a6cb633

Please sign in to comment.